v1.0 beta init

This commit is contained in:
life
2014-10-22 16:20:45 +08:00
parent 8ae438272b
commit 593d2c2965
225 changed files with 27217 additions and 3675 deletions

View File

@@ -17,9 +17,22 @@ func (c Admin) Index() revel.Result {
c.RenderArgs["title"] = "leanote"
c.SetLocale()
c.RenderArgs["countUser"] = userService.CountUser()
c.RenderArgs["countNote"] = noteService.CountNote()
c.RenderArgs["countBlog"] = noteService.CountBlog()
return c.RenderTemplate("admin/index.html");
}
// 模板
func (c Admin) T(t string) revel.Result {
c.RenderArgs["str"] = configService.GlobalStringConfigs
c.RenderArgs["arr"] = configService.GlobalArrayConfigs
c.RenderArgs["map"] = configService.GlobalMapConfigs
c.RenderArgs["arrMap"] = configService.GlobalArrMapConfigs
return c.RenderTemplate("admin/" + t + ".html")
}
func (c Admin) GetView(view string) revel.Result {
return c.RenderTemplate("admin/" + view);
}