30 lines
844 B
Plaintext

component CompaniesIndex(groups [][]*arn.Company, user *arn.User)
CompaniesTabs(user)
h1.page-title All companies
.company-index-groups
each group in groups
.company-index-group.mountable
h3= strings.ToUpper(group[0].Name.English[:1])
ul
each company in group
li
a(href=company.Link())= company.Name.English
component CompaniesTabs(user *arn.User)
.tabs
Tab("Popular", "globe", "/companies")
Tab("All", "font", "/companies/all")
.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(href="/company/" + user.DraftIndex().CompanyID + "/edit")
Icon("pencil")
span Edit draft