28 lines
862 B
Plaintext
Raw Normal View History

2017-06-26 15:17:53 +02:00
component Thread(thread *arn.Thread, posts []*arn.Post, user *arn.User)
2017-07-06 22:08:49 +02:00
h1.thread-title= thread.Title
2017-06-26 23:04:15 +02:00
#thread.thread(data-id=thread.ID)
2016-11-19 17:49:00 +09:00
.posts
2017-07-06 16:54:10 +02:00
Postable(thread.ToPostable(), user, thread.Author().ID)
2017-06-22 14:38:01 -03:00
2016-11-19 23:54:31 +09:00
each post in posts
2017-07-06 16:54:10 +02:00
Postable(post.ToPostable(), user, thread.Author().ID)
2017-06-26 15:17:53 +02:00
// Reply
if user != nil
.post.mountable
.post-author
Avatar(user)
.post-content
2017-07-21 05:51:11 +02:00
textarea#new-reply(placeholder="Reply...", aria-label="Reply")
2017-06-26 19:03:48 +02:00
2017-06-27 04:33:24 +02:00
.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