21 lines
736 B
Plaintext
Raw Normal View History

2018-10-29 02:56:45 +00:00
component Comments(parent arn.PostParent, user *arn.User)
.thread
.posts
2018-10-29 03:35:38 +00:00
if user == nil && parent.CountPosts() == 0
p.no-data.mountable No comments have been written yet.
else
each post in parent.Posts()
2018-11-05 10:05:36 +00:00
Postable(post, user, true, "", "")
2018-10-29 02:56:45 +00:00
if user != nil
2018-11-01 06:06:04 +00:00
if arn.IsLocked(parent)
2018-10-29 02:56:45 +00:00
footer.footer.mountable
p.text-center= "This " + strings.ToLower(reflect.TypeOf(parent).Elem().Name()) + " is locked."
else
NewPostArea(user, "Comment")
.buttons
2018-11-01 06:06:04 +00:00
if !arn.IsLocked(parent)
2018-10-29 02:56:45 +00:00
button.mountable.action(data-action="createPost", data-trigger="click", data-parent-type=reflect.TypeOf(parent).Elem().Name(), data-parent-id=parent.GetID())
Icon("mail-reply")
span Reply