2017-10-18 16:18:15 +00:00
|
|
|
component Groups(groups []*arn.Group, groupsPerPage int, user *arn.User)
|
2017-10-17 21:17:04 +00:00
|
|
|
.tabs
|
|
|
|
Tab("Groups", "users", "/groups")
|
|
|
|
|
|
|
|
h1.page-title Groups
|
|
|
|
|
2018-03-06 23:36:04 +00:00
|
|
|
.corner-buttons
|
2017-10-17 21:17:04 +00:00
|
|
|
if user != nil
|
|
|
|
if user.DraftIndex().GroupID == ""
|
|
|
|
button.action(data-action="newObject", data-trigger="click", data-type="group")
|
|
|
|
Icon("plus")
|
|
|
|
span New group
|
|
|
|
else
|
2018-03-23 20:33:19 +00:00
|
|
|
a.button(href="/group/" + user.DraftIndex().GroupID + "/edit")
|
2017-10-17 21:17:04 +00:00
|
|
|
Icon("pencil")
|
|
|
|
span Edit draft
|
|
|
|
|
2017-10-18 16:18:15 +00:00
|
|
|
#load-more-target.groups
|
2017-10-17 21:17:04 +00:00
|
|
|
each group in groups
|
2018-03-23 20:33:19 +00:00
|
|
|
a.group.mountable(href=group.Link())
|
2017-10-18 16:18:15 +00:00
|
|
|
img.group-image.lazy(data-src=group.ImageURL(), alt=group.Name)
|
2018-03-06 23:36:04 +00:00
|
|
|
|
2017-10-18 16:18:15 +00:00
|
|
|
.group-info
|
|
|
|
h3.group-name= group.Name
|
|
|
|
.group-tagline= group.Tagline
|
|
|
|
.group-member-count
|
|
|
|
Icon("user")
|
|
|
|
span= len(group.Members)
|
|
|
|
|
|
|
|
if len(groups) == groupsPerPage
|
|
|
|
.buttons
|
|
|
|
LoadMore(groupsPerPage)
|