2018-11-15 20:19:40 +09:00

15 lines
505 B
Plaintext

component Comments(parent arn.PostParent, user *arn.User)
.thread
.posts
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(parent, user, "Comment")
if user == nil && parent.CountPosts() == 0
p.no-data.mountable No comments have been written yet.
else
each post in parent.PostsRelevantFirst(5)
Postable(post, user, true, "", "")