2018-11-05 22:10:40 +09:00

19 lines
610 B
Plaintext

component Comments(parent arn.PostParent, user *arn.User)
.thread
.posts
if user == nil && parent.CountPosts() == 0
p.no-data.mountable No comments have been written yet.
else
each post in parent.Posts()
Postable(post, user, true, "", "")
if user != nil
if arn.IsLocked(parent)
footer.footer.mountable
p.text-center= "This " + strings.ToLower(reflect.TypeOf(parent).Elem().Name()) + " is locked."
else
NewPostArea(user, "Comment")
.buttons
if !arn.IsLocked(parent)
NewPostActions(reflect.TypeOf(parent).Elem().Name(), parent.GetID(), false)