25 lines
871 B
Plaintext
Raw Normal View History

2018-11-15 11:19:40 +00:00
component NewPostArea(parent arn.PostParent, user *arn.User, placeholder string)
2018-11-05 11:57:37 +00:00
#new-post.post.mountable
2018-11-05 10:05:36 +00:00
.post-parent
.post-author
Avatar(user)
2018-11-05 11:57:37 +00:00
textarea#new-post-text.post-content(placeholder=placeholder + "...", aria-label=placeholder)
2018-11-15 11:19:40 +00:00
if !arn.IsLocked(parent)
NewPostActions(parent, false)
component NewPostActions(parent arn.PostParent, cancelButton bool)
.buttons.new-post-actions
button#reply-button.mountable.action(data-action="createPost", data-trigger="click", data-parent-type=parent.TypeName(), data-parent-id=parent.GetID())
2018-11-05 11:57:37 +00:00
Icon("mail-reply")
2018-11-15 11:19:40 +00:00
if parent.TypeName() == "Post" || parent.TypeName() == "Thread"
span= "Reply to " + parent.Creator().Nick
else
span Submit
2018-11-05 11:57:37 +00:00
2018-11-05 12:04:47 +00:00
if cancelButton
button#reply-cancel-button.mountable.action(data-action="cancelReply", data-trigger="click")
Icon("close")
span Cancel