sync
This commit is contained in:
parent
e4b0969ecf
commit
80ae1c4f91
3 changed files with 108 additions and 102 deletions
84
controllers/tablerdemo.go
Normal file
84
controllers/tablerdemo.go
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
package controllers
|
||||
|
||||
|
||||
// FormtablerFormElementsPage is the page-specific struct for the form elements demo.
|
||||
// Each field is one of the 25 form element groups.
|
||||
type FormtablerFormElementsPage struct {
|
||||
TextInputs []FormtablerTextInput
|
||||
IconInputs []FormtablerIconInput
|
||||
IconSeparated FormtablerIconSeparated
|
||||
InputSizing FormtablerInputSizing
|
||||
FileInput FormtablerFileInput
|
||||
ColorInput FormtablerColorInput
|
||||
ColorPicker FormtablerColorPicker
|
||||
RangeInput FormtablerRangeInput
|
||||
Datalist FormtablerDatalist
|
||||
ImageCheck FormtablerImageCheck
|
||||
ImageRadio FormtablerImageRadio
|
||||
ImagePerson FormtablerImagePerson
|
||||
Checkboxes FormtablerCheckboxes
|
||||
CheckboxesInline FormtablerCheckboxesInline
|
||||
Radios FormtablerRadios
|
||||
RadiosInline FormtablerRadiosInline
|
||||
Toggles FormtablerToggle
|
||||
ToggleSingle FormtablerToggleSingle
|
||||
Select FormtablerSelect
|
||||
Selectgroups []FormtablerSelectGroup
|
||||
SelectgroupPayments FormtablerSelectgroupPayments
|
||||
SelectgroupProjectManager FormtablerSelectgroupProjectManager
|
||||
Fieldset FormtablerFieldset
|
||||
CheckboxesList FormtablerCheckboxesList
|
||||
ValidationStates FormtablerValidationStates
|
||||
}
|
||||
|
||||
// FormtablerComponentsPage is the page-specific struct for the combined demo
|
||||
// showing alerts, toasts, and breadcrumbs.
|
||||
type FormtablerComponentsPage struct {
|
||||
Alerts []FormtablerAlert
|
||||
Breadcrumbs []FormtablerBreadcrumb
|
||||
Toasts []FormtablerToast
|
||||
}
|
||||
|
||||
// FormtablerUserSettingsSection represents a section in the settings sidebar.
|
||||
type FormtablerUserSettingsSection struct {
|
||||
Title string
|
||||
SubItems []FormtablerUserSettingsNavItem
|
||||
}
|
||||
|
||||
// FormtablerUserSettingsNavItem represents a single navigation item in the settings sidebar.
|
||||
type FormtablerUserSettingsNavItem struct {
|
||||
Title string
|
||||
Link string
|
||||
Active bool
|
||||
}
|
||||
|
||||
// FormtablerUserSettingsPage holds the data for the user settings page.
|
||||
type FormtablerUserSettingsPage struct {
|
||||
SidebarSections []FormtablerUserSettingsSection
|
||||
ActiveTab string
|
||||
}
|
||||
|
||||
// AdminUserRow represents a single user in the admin users list.
|
||||
type AdminUserRow struct {
|
||||
Name string
|
||||
Email string
|
||||
Status string // "Active", "Inactive", "Invited"
|
||||
Roles string // comma-separated role names
|
||||
EditLink string
|
||||
}
|
||||
|
||||
// AdminUsersPage holds the data for the admin users page.
|
||||
type AdminUsersPage struct {
|
||||
Users []AdminUserRow
|
||||
AddLink string
|
||||
}
|
||||
|
||||
// AdminCustomersPage holds the data for the admin customers listing page.
|
||||
type AdminCustomersPage struct {
|
||||
Customers []CustomerTableRow
|
||||
}
|
||||
|
||||
// AuthLockPageData holds the data for the account lock page.
|
||||
type AuthLockPageData struct {
|
||||
PersonName string
|
||||
}
|
||||
|
|
@ -443,88 +443,6 @@ type FormtablerCard struct {
|
|||
Progress *FormtablerCardProgress
|
||||
}
|
||||
|
||||
// FormtablerFormElementsPage is the page-specific struct for the form elements demo.
|
||||
// Each field is one of the 25 form element groups.
|
||||
type FormtablerFormElementsPage struct {
|
||||
TextInputs []FormtablerTextInput
|
||||
IconInputs []FormtablerIconInput
|
||||
IconSeparated FormtablerIconSeparated
|
||||
InputSizing FormtablerInputSizing
|
||||
FileInput FormtablerFileInput
|
||||
ColorInput FormtablerColorInput
|
||||
ColorPicker FormtablerColorPicker
|
||||
RangeInput FormtablerRangeInput
|
||||
Datalist FormtablerDatalist
|
||||
ImageCheck FormtablerImageCheck
|
||||
ImageRadio FormtablerImageRadio
|
||||
ImagePerson FormtablerImagePerson
|
||||
Checkboxes FormtablerCheckboxes
|
||||
CheckboxesInline FormtablerCheckboxesInline
|
||||
Radios FormtablerRadios
|
||||
RadiosInline FormtablerRadiosInline
|
||||
Toggles FormtablerToggle
|
||||
ToggleSingle FormtablerToggleSingle
|
||||
Select FormtablerSelect
|
||||
Selectgroups []FormtablerSelectGroup
|
||||
SelectgroupPayments FormtablerSelectgroupPayments
|
||||
SelectgroupProjectManager FormtablerSelectgroupProjectManager
|
||||
Fieldset FormtablerFieldset
|
||||
CheckboxesList FormtablerCheckboxesList
|
||||
ValidationStates FormtablerValidationStates
|
||||
}
|
||||
|
||||
// FormtablerComponentsPage is the page-specific struct for the combined demo
|
||||
// showing alerts, toasts, and breadcrumbs.
|
||||
type FormtablerComponentsPage struct {
|
||||
Alerts []FormtablerAlert
|
||||
Breadcrumbs []FormtablerBreadcrumb
|
||||
Toasts []FormtablerToast
|
||||
}
|
||||
|
||||
// FormtablerUserSettingsSection represents a section in the settings sidebar.
|
||||
type FormtablerUserSettingsSection struct {
|
||||
Title string
|
||||
SubItems []FormtablerUserSettingsNavItem
|
||||
}
|
||||
|
||||
// FormtablerUserSettingsNavItem represents a single navigation item in the settings sidebar.
|
||||
type FormtablerUserSettingsNavItem struct {
|
||||
Title string
|
||||
Link string
|
||||
Active bool
|
||||
}
|
||||
|
||||
// FormtablerUserSettingsPage holds the data for the user settings page.
|
||||
type FormtablerUserSettingsPage struct {
|
||||
SidebarSections []FormtablerUserSettingsSection
|
||||
ActiveTab string
|
||||
}
|
||||
|
||||
// AdminUserRow represents a single user in the admin users list.
|
||||
type AdminUserRow struct {
|
||||
Name string
|
||||
Email string
|
||||
Status string // "Active", "Inactive", "Invited"
|
||||
Roles string // comma-separated role names
|
||||
EditLink string
|
||||
}
|
||||
|
||||
// AdminUsersPage holds the data for the admin users page.
|
||||
type AdminUsersPage struct {
|
||||
Users []AdminUserRow
|
||||
AddLink string
|
||||
}
|
||||
|
||||
// AdminCustomersPage holds the data for the admin customers listing page.
|
||||
type AdminCustomersPage struct {
|
||||
Customers []CustomerTableRow
|
||||
}
|
||||
|
||||
// AuthLockPageData holds the data for the account lock page.
|
||||
type AuthLockPageData struct {
|
||||
PersonName string
|
||||
}
|
||||
|
||||
// TablerPageData holds the common data for all tabler pages.
|
||||
// It should NOT contain component-specific fields like tables or forms.
|
||||
// Add those by creating a page-specific struct that embeds TablerPageData
|
||||
|
|
|
|||
44
routes.go
44
routes.go
|
|
@ -61,33 +61,37 @@ func registerRoutes() {
|
|||
controller.Get("/appsession", controllers.AppSession)
|
||||
controller.Post("/appsession", controllers.AppSession)
|
||||
|
||||
// Tabler layout routes
|
||||
|
||||
controller.Get("/demotabler1", controllers.TablerDemo1)
|
||||
|
||||
// Tabler layout routes
|
||||
controller.Get("/tablertable", controllers.TablerTables)
|
||||
controller.Get("/tablerformelements", controllers.TablerFormElements)
|
||||
controller.Get("/tablercards", controllers.TablerCards)
|
||||
controller.Get("/tablercomponents", controllers.TablerComponents)
|
||||
controller.Get("/tablersingle", controllers.TablerSingle)
|
||||
controller.Get("/tablerdefault", controllers.TablerDefault)
|
||||
controller.Get("/tablerhome", controllers.TablerHome)
|
||||
controller.Get("/tablernavmenu", controllers.TablerNavbar)
|
||||
controller.Get("/user/login", controllers.UserSignIn)
|
||||
controller.Post("/user/login", controllers.UserSignIn)
|
||||
controller.Get("/user/signup", controllers.UserSignUp)
|
||||
controller.Post("/user/signup", controllers.UserSignUp)
|
||||
controller.Get("/user/forgot", controllers.UserForgot)
|
||||
controller.Post("/user/forgot", controllers.UserForgot)
|
||||
controller.Get("/user/lock", controllers.UserLock)
|
||||
controller.Post("/user/lock", controllers.UserLock)
|
||||
controller.Get("/user/settings", controllers.UserSettings)
|
||||
controller.Post("/user/settings", controllers.UserSettings)
|
||||
|
||||
controller.Get("/admin/users", controllers.AdminUsers)
|
||||
controller.Post("/admin/users", controllers.AdminUsers)
|
||||
controller.Get("/admin/customers", controllers.AdminCustomers)
|
||||
controller.Post("/admin/customers", controllers.AdminCustomers)
|
||||
|
||||
controller.Get("/tablertable", controllers.TablerTables)
|
||||
controller.Get("/tablerformelements", controllers.TablerFormElements)
|
||||
controller.Get("/tablercards", controllers.TablerCards)
|
||||
controller.Get("/tablercomponents", controllers.TablerComponents)
|
||||
// Tabler layout routes
|
||||
|
||||
controller.Get("/user/login", controllers.UserSignIn)
|
||||
controller.Post("/user/login", controllers.UserSignIn)
|
||||
controller.Get("/user/signup", controllers.UserSignUp)
|
||||
controller.Post("/user/signup", controllers.UserSignUp)
|
||||
controller.Get("/user/forgot", controllers.UserForgot)
|
||||
controller.Post("/user/forgot", controllers.UserForgot)
|
||||
controller.Get("/user/lock", controllers.UserLock)
|
||||
controller.Post("/user/lock", controllers.UserLock)
|
||||
controller.Get("/user/settings", controllers.UserSettings)
|
||||
controller.Post("/user/settings", controllers.UserSettings)
|
||||
|
||||
controller.Get("/admin/users", controllers.AdminUsers)
|
||||
controller.Post("/admin/users", controllers.AdminUsers)
|
||||
controller.Get("/admin/customers", controllers.AdminCustomers)
|
||||
controller.Post("/admin/customers", controllers.AdminCustomers)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue