19 lines
610 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-11-05 13:10:40 +00:00
NewPostActions(reflect.TypeOf(parent).Elem().Name(), parent.GetID(), false)