Upgrade revel from 0.13 to 0.14

https://github.com/revel/revel/releases/tag/v0.14.0
This commit is contained in:
lealife
2017-04-08 18:55:42 +08:00
parent 721e375d76
commit 6af19670da
39 changed files with 503 additions and 503 deletions

View File

@ -14,23 +14,23 @@ type Admin struct {
func (c Admin) Index() revel.Result {
c.SetUserInfo()
c.RenderArgs["title"] = "leanote"
c.ViewArgs["title"] = "leanote"
c.SetLocale()
c.RenderArgs["countUser"] = userService.CountUser()
c.RenderArgs["countNote"] = noteService.CountNote("")
c.RenderArgs["countBlog"] = noteService.CountBlog("")
c.ViewArgs["countUser"] = userService.CountUser()
c.ViewArgs["countNote"] = noteService.CountNote("")
c.ViewArgs["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
c.RenderArgs["version"] = configService.GetVersion()
c.ViewArgs["str"] = configService.GlobalStringConfigs
c.ViewArgs["arr"] = configService.GlobalArrayConfigs
c.ViewArgs["map"] = configService.GlobalMapConfigs
c.ViewArgs["arrMap"] = configService.GlobalArrMapConfigs
c.ViewArgs["version"] = configService.GetVersion()
return c.RenderTemplate("admin/" + t + ".html")
}