Added infinite scrolling to companies

This commit is contained in:
2018-03-13 23:06:16 +01:00
parent 3e2594ab9f
commit 40e2c43a8d
12 changed files with 64 additions and 63 deletions

30
pages/companies/all.pixy Normal file
View File

@ -0,0 +1,30 @@
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.ajax(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.ajax(href="/company/" + user.DraftIndex().CompanyID + "/edit")
Icon("pencil")
span Edit draft