23 lines
741 B
Plaintext

component Thread(thread *arn.Thread, posts []*arn.Post, user *arn.User)
h1.thread-title= thread.Title
#thread.thread(data-id=thread.ID)
.posts
Postable(thread.ToPostable(), user, thread.Author().ID)
each post in posts
Postable(post.ToPostable(), user, thread.Author().ID)
// Reply
if user != nil
NewPostArea(user, "Reply")
.buttons
button.action(data-action="forumReply", data-trigger="click")
Icon("mail-reply")
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