func (c *Group) Edit() { id := c.GetInput("id") mgroup := models.NewGroupModel() agroup, err := mgroup.Where("groupid = ?", id).Get() if err == nil { c.Assign("agroup", agroup) } menu := admin.NewMenu() c.Assign("menus", menu.Menus) }
func (c *Index) Index() { menu := admin.NewMenu() views, err := json.Marshal(menu.Views) if err == nil { c.Assign("JsonViews", string(views)) } menus, err := json.Marshal(menu.Menus) if err == nil { c.Assign("JsonMenus", string(menus)) c.Assign("Menus", menu.Menus) } }
func (c *Group) Add() { menu := admin.NewMenu() c.Assign("menus", menu.Menus) }