Esempio n. 1
0
File: group.go Progetto: rainkid/ago
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)
}
Esempio n. 2
0
File: index.go Progetto: rainkid/ago
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)
	}
}
Esempio n. 3
0
File: group.go Progetto: rainkid/ago
func (c *Group) Add() {
	menu := admin.NewMenu()
	c.Assign("menus", menu.Menus)
}