Beispiel #1
0
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)
}
Beispiel #2
0
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)
	}
}
Beispiel #3
0
func (c *Group) Add() {
	menu := admin.NewMenu()
	c.Assign("menus", menu.Menus)
}