32 lines
853 B
Plaintext
Raw Normal View History

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
a.button.ajax(href="/group/" + user.DraftIndex().GroupID + "/edit")
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
2017-10-18 16:18:15 +00:00
a.group.mountable.ajax(href=group.Link())
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)