示例#1
0
文件: public.go 项目: 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")
}
示例#2
0
文件: public.go 项目: JREAMLU/GoCMS
//后台地图
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")
}