Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMenu ¶
func NewMenu(conn db.Connection, data NewMenuData) (int64, error)
Types ¶
type Item ¶
type Item struct {
Name string `json:"name"`
ID string `json:"id"`
Url string `json:"url"`
IsLinkUrl bool `json:"isLinkUrl"`
Icon string `json:"icon"`
Header string `json:"header"`
Active string `json:"active"`
ChildrenList []Item `json:"childrenList"`
}
Item is an menu item.
type Menu ¶
type Menu struct {
List []Item `json:"list"`
Options []map[string]string `json:"options"`
MaxOrder int64 `json:"maxOrder"`
PluginName string `json:"pluginName"`
ForceUpdate bool `json:"forceUpdate"`
}
Menu contains list of menu items and other info.
func GetGlobalMenu ¶
func GetGlobalMenu(user models.UserModel, conn db.Connection, lang string, pluginNames ...string) *Menu
GetGlobalMenu return Menu of given user model.
func (Menu) FormatPath ¶
FormatPath get template.HTML for front-end.
func (*Menu) GetEditMenuList ¶
GetEditMenuList return menu items list.
func (*Menu) SetActiveClass ¶
SetActiveClass set the active class of menu.
func (*Menu) SetMaxOrder ¶
SetMaxOrder set the max order of menu.
type NewMenuData ¶
Click to show internal directories.
Click to hide internal directories.