2017-11-29 14:26:11 +00:00
|
|
|
component Companies(groups [][]*arn.Company, user *arn.User)
|
2017-12-02 20:53:01 +00:00
|
|
|
CompaniesTabs(user)
|
2017-11-18 10:46:17 +00:00
|
|
|
|
2017-12-02 22:18:11 +00:00
|
|
|
h1.page-title All companies
|
|
|
|
|
2017-12-02 20:53:01 +00:00
|
|
|
.companies
|
|
|
|
each group in groups
|
|
|
|
.companies-group
|
|
|
|
h3= group[0].Name.English[:1]
|
|
|
|
|
|
|
|
ul
|
|
|
|
each company in group
|
|
|
|
li.mountable
|
|
|
|
a.ajax(href=company.Link())= company.Name.English
|
|
|
|
|
|
|
|
component CompaniesTabs(user *arn.User)
|
|
|
|
.tabs
|
|
|
|
Tab("All", "font", "/companies")
|
|
|
|
Tab("Popular", "globe", "/companies/popular")
|
|
|
|
|
2017-11-18 23:42:22 +00:00
|
|
|
.corner-buttons
|
2017-11-18 10:46:17 +00:00
|
|
|
if user != nil
|
|
|
|
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")
|
2017-12-02 20:53:01 +00:00
|
|
|
span Edit draft
|