2017-06-26 13:17:53 +00:00
|
|
|
component Thread(thread *arn.Thread, posts []*arn.Post, user *arn.User)
|
2017-07-06 20:08:49 +00:00
|
|
|
h1.thread-title= thread.Title
|
2016-12-02 06:24:45 +00:00
|
|
|
|
2017-06-26 21:04:15 +00:00
|
|
|
#thread.thread(data-id=thread.ID)
|
2016-11-19 08:49:00 +00:00
|
|
|
.posts
|
2017-07-06 14:54:10 +00:00
|
|
|
Postable(thread.ToPostable(), user, thread.Author().ID)
|
2017-06-22 17:38:01 +00:00
|
|
|
|
2016-11-19 14:54:31 +00:00
|
|
|
each post in posts
|
2017-07-06 14:54:10 +00:00
|
|
|
Postable(post.ToPostable(), user, thread.Author().ID)
|
2017-06-26 13:17:53 +00:00
|
|
|
|
|
|
|
// Reply
|
|
|
|
if user != nil
|
|
|
|
.post.mountable
|
|
|
|
.post-author
|
|
|
|
Avatar(user)
|
|
|
|
|
|
|
|
.post-content
|
2017-07-21 03:51:11 +00:00
|
|
|
textarea#new-reply(placeholder="Reply...", aria-label="Reply")
|
2017-06-26 17:03:48 +00:00
|
|
|
|
2017-06-27 02:33:24 +00:00
|
|
|
.buttons
|
|
|
|
button.action(data-action="forumReply", data-trigger="click")
|
|
|
|
Icon("mail-reply")
|
2017-11-25 16:41:18 +00:00
|
|
|
span Reply
|
|
|
|
if user.Role == "admin" || user.Role == "editor"
|
|
|
|
button.action(data-action="deleteObject", data-trigger="click", data-return-path="/forum", data-confirm-type="thread", data-api="/api/thread/" + thread.ID)
|
|
|
|
Icon("trash")
|
|
|
|
span Delete
|
|
|
|
|