30 lines
841 B
Plaintext

component Companies(groups [][]*arn.Company, user *arn.User)
CompaniesTabs(user)
h1.page-title All companies
.company-groups
each group in groups
.company-group.mountable
h3= strings.ToUpper(group[0].Name.English[:1])
ul
each company in group
li
a.ajax(href=company.Link())= company.Name.English
component CompaniesTabs(user *arn.User)
.tabs
Tab("All", "font", "/companies")
Tab("Popular", "globe", "/companies/popular")
.corner-buttons
if user != nil && (user.Role == "editor" || user.Role == "admin")
if user.DraftIndex().CompanyID == ""
button.action(data-action="newObject", data-trigger="click", data-type="company")
Icon("plus")
span Add company
else
a.button.ajax(href="/company/" + user.DraftIndex().CompanyID + "/edit")
Icon("pencil")
span Edit draft