Exemplo n.º 1
0
Arquivo: public.go Projeto: qmdx/GoCMS
//后台地图
func (c *Public) Map(menu *models.Menu) revel.Result {

	//返回后台地图
	map_html := menu.GetMenuMap()

	c.Render(map_html)
	return c.RenderTemplate("Public/map.html")
}
Exemplo n.º 2
0
//后台地图
func (c *Public) Map(menu *models.Menu) revel.Result {

	title := "后台地图--GoCMS管理系统"

	if UserID, ok := c.Session["UserID"]; ok {
		UserID, err := strconv.ParseInt(UserID, 10, 64)
		if err != nil {
			revel.WARN.Println(err)
		}
		admin := new(models.Admin)
		admin_info := admin.GetById(UserID)

		//返回后台地图
		map_html := menu.GetMenuMap(admin_info)

		c.Render(title, map_html)
	} else {
		c.Render(title)
	}

	return c.RenderTemplate("Public/map.html")
}