New user profile

This commit is contained in:
2018-11-15 20:19:40 +09:00
parent a1c11a2eae
commit d5dff615c1
29 changed files with 271 additions and 141 deletions

View File

@ -1,19 +1,15 @@
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)
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, "", "")