67 lines
1.7 KiB
Go
67 lines
1.7 KiB
Go
package controllers
|
|
|
|
// TablerMenuItem represents a single item in the navbar menu
|
|
type TablerMenuItem struct {
|
|
Title string `json:"title"`
|
|
TitleLong string `json:"title-long,omitempty"`
|
|
Icon string `json:"icon,omitempty"`
|
|
URL string `json:"url,omitempty"`
|
|
Badge string `json:"badge,omitempty"`
|
|
Color string `json:"color,omitempty"`
|
|
Active bool `json:"active,omitempty"`
|
|
Disabled bool `json:"disabled,omitempty"`
|
|
Columns int `json:"columns,omitempty"`
|
|
Children []*TablerMenuItem `json:"children,omitempty"`
|
|
}
|
|
|
|
// TablerMenu is a map of menu sections keyed by identifier
|
|
type TablerMenu map[string]*TablerMenuItem
|
|
|
|
// TableHeader represents a column header
|
|
type TableHeader struct {
|
|
Name string
|
|
Sort string
|
|
Width string
|
|
}
|
|
|
|
// TableRow represents a single row of mock data
|
|
type TableRow struct {
|
|
ID string
|
|
Name string
|
|
AvatarID string
|
|
Email string
|
|
City string
|
|
Country string
|
|
Status string
|
|
JobTitle string
|
|
Department string
|
|
Date string
|
|
Tags []string
|
|
Category string
|
|
}
|
|
|
|
// TablerPageData holds the common data for all tabler pages
|
|
type TablerPageData struct {
|
|
PageTitle string
|
|
PageDescription string
|
|
BodyClass string
|
|
Content interface{}
|
|
// Default layout fields
|
|
Sidebar bool
|
|
ShowTopbar bool
|
|
WrapperFull bool
|
|
ContainerCentered bool
|
|
ContainerClass string
|
|
// Page header
|
|
PageHeader string
|
|
PagePretitle string
|
|
// Navbar fields
|
|
UserName string
|
|
UserRole string
|
|
NavbarMenu TablerMenu
|
|
CurrentPage string
|
|
// Table data
|
|
TableHeaders []TableHeader
|
|
TableRows []TableRow
|
|
PerPageOptions []string
|
|
}
|