32 lines
1.0 KiB
Plaintext
Raw Normal View History

2018-11-05 10:05:36 +00:00
component Thread(thread *arn.Thread, user *arn.User)
2018-04-25 16:59:23 +00:00
h1.thread-title= thread.Title
#thread.thread(data-id=thread.ID)
.posts
2019-08-30 01:02:22 +00:00
Postable(thread, user, true, false, thread.Creator().ID)
2018-04-25 16:59:23 +00:00
//- Reply
if user != nil
if thread.Locked
footer.footer.mountable
p.text-center This topic is locked.
else
2018-11-15 11:19:40 +00:00
NewPostArea(thread, user, "Reply")
2018-04-25 16:59:23 +00:00
.buttons
if !thread.Locked
2018-11-15 11:19:40 +00:00
NewPostActions(thread, false)
2018-04-25 16:59:23 +00:00
if user.Role == "admin" || user.Role == "editor"
if thread.Locked
button.mountable.action(data-action="unlockThread", data-trigger="click", data-api="/api/thread/" + thread.ID)
Icon("unlock")
span Unlock
else
button.mountable.action(data-action="lockThread", data-trigger="click", data-api="/api/thread/" + thread.ID)
Icon("lock")
span Lock
button.mountable.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