Company UI improvements
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package companies
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
@ -17,6 +19,10 @@ func Get(ctx *aero.Context) string {
|
||||
return !company.IsDraft
|
||||
})
|
||||
|
||||
sort.Slice(companies, func(i, j int) bool {
|
||||
return companies[i].Created > companies[j].Created
|
||||
})
|
||||
|
||||
if len(companies) > maxEntries {
|
||||
companies = companies[:maxEntries]
|
||||
}
|
||||
|
@ -14,4 +14,5 @@ component Companies(companies []*arn.Company, user *arn.User)
|
||||
|
||||
ul
|
||||
each company in companies
|
||||
li= company.Name.English
|
||||
li
|
||||
a.ajax(href=company.Link())= company.Name.English
|
Reference in New Issue
Block a user