Added advanced thread and post editing for admins

This commit is contained in:
2018-06-03 08:52:38 +09:00
parent 0fd8692100
commit b5f4585edd
6 changed files with 80 additions and 0 deletions

View File

@ -37,6 +37,10 @@ component Postable(post arn.Postable, user *arn.User, highlightAuthorID string)
else
a.post-tool.post-like.tip.action(id="like-" + post.ID(), aria-label="Like", data-action="like", data-trigger="click")
Icon("thumbs-up")
if user.Role == "admin"
a.post-tool.post-edit.tip(href=post.Link() + "/edit", aria-label="Edit")
Icon("edit")
if user.ID == post.Creator().ID
a.post-tool.post-edit.tip.action(data-action="editPost", data-trigger="click", data-id=post.ID(), aria-label="Edit")