Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMenu ¶ added in v1.2.25
func NewMenu(conn db.Connection, data NewMenuData) (int64, error)
Types ¶
type Item ¶ added in v1.2.25
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) AddMaxOrder ¶ added in v1.2.25
func (menu *Menu) AddMaxOrder()
AddMaxOrder add the max order of menu.
func (Menu) FormatPath ¶ added in v1.2.25
FormatPath get template.HTML for front-end.
func (*Menu) GetEditMenuList ¶
GetEditMenuList return menu items list.
func (*Menu) GetUpdateJS ¶ added in v1.2.25
func (*Menu) SetActiveClass ¶
SetActiveClass set the active class of menu.
func (*Menu) SetMaxOrder ¶ added in v1.2.25
SetMaxOrder set the max order of menu.
type NewMenuData ¶ added in v1.2.25
Click to show internal directories.
Click to hide internal directories.