32bf0415/html_components/table.go
1970-01-01 00:00:00 +00:00

47 lines
885 B
Go

package html_components
type TableColumnType string
const (
TableColumnTypeText TableColumnType = "text"
TableColumnTypeImage TableColumnType = "image"
)
type TableColumn struct {
Value string
Type TableColumnType
}
type TableRow struct {
Id string
Columns []TableColumn
EntityUrl string
EditItemUrl string
DeleteItemUrl string
}
type Pagination struct {
PreviousDisabled bool
NextDisabled bool
Page int
TotalNumberOfItems int
CurrenItemStart int
CurrentItemEnd int
PreviousPage int
NextPage int
}
type GohtmlTable struct {
Headers []string
Rows []TableRow
EntityUrl string
OrderBy string
OrderDirection string
FilterValue string
FilterSelect SelectInput
Pagination Pagination
ShowBack bool
BackUrl string
CreateItemUrl string
}