45 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-03-06 23:36:04 +00:00
component Group(group *arn.Group, user *arn.User)
GroupTabs(group, user)
2017-10-17 21:17:04 +00:00
if group.Name != ""
2017-10-18 19:18:10 +00:00
h1.mountable= group.Name
2017-10-17 21:17:04 +00:00
else
2017-10-18 19:18:10 +00:00
h1.mountable untitled
2017-10-17 21:17:04 +00:00
2017-10-18 19:18:10 +00:00
.group-view
.group-sidebar.mountable
2017-10-18 20:09:17 +00:00
if group.Description != ""
.group-sidebar-section
h3 Description
.group-description!= markdown.Render(group.Description)
2017-10-18 19:18:10 +00:00
2017-10-18 20:09:17 +00:00
if group.Rules != ""
.group-sidebar-section
h3 Rules
.group-rules!= markdown.Render(group.Rules)
2017-10-18 19:18:10 +00:00
.group-sidebar-section
h3 Members
.user-avatars.group-members
each member in group.Members
Avatar(member.User())
.group-feed.mountable
2018-03-07 00:08:47 +00:00
if user != nil
NewPostArea(user, "Content")
.buttons
button.action(data-action="newGroupPost", data-trigger="click")
Icon("check")
span Publish
each post in group.Posts()
p!= post.HTML()
2017-10-17 21:17:04 +00:00
2018-03-06 23:36:04 +00:00
component GroupTabs(group *arn.Group, user *arn.User)
2017-10-17 21:17:04 +00:00
.tabs
Tab("Group", "users", group.Link())
2018-03-06 23:36:04 +00:00
//- Tab("Forum", "comment", group.Link() + "/forum")
if user != nil && group.FindMember(user.ID) != nil && group.FindMember(user.ID).Role == "founder"
Tab("Edit", "pencil", group.Link() + "/edit")