Added a delete action button next to the reply button on a thread
This commit is contained in:
Eduard Urbach 2017-11-26 15:58:59 +01:00 committed by GitHub
commit e747e6e480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,4 +20,9 @@ component Thread(thread *arn.Thread, posts []*arn.Post, user *arn.User)
.buttons .buttons
button.action(data-action="forumReply", data-trigger="click") button.action(data-action="forumReply", data-trigger="click")
Icon("mail-reply") Icon("mail-reply")
span 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