aboutsummaryrefslogtreecommitdiff
path: root/routers/dashboard.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-24 15:28:31 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-24 15:28:31 -0400
commit80055bde86c21f1245a7b45ba30406db7640fec0 (patch)
tree04a3da65727ad9ea31e3d39504a73b589c5386cf /routers/dashboard.go
parente33a1044482f6f7e9e82c2b0f5523b1cfb5213a0 (diff)
Code convention
Diffstat (limited to 'routers/dashboard.go')
-rw-r--r--routers/dashboard.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/dashboard.go b/routers/dashboard.go
index 6387089e..94324b15 100644
--- a/routers/dashboard.go
+++ b/routers/dashboard.go
@@ -24,6 +24,8 @@ func Home(ctx *middleware.Context) {
return
}
+ ctx.Data["PageIsHome"] = true
+
// Show recent updated repositoires for new visiters.
repos, err := models.GetRecentUpdatedRepositories()
if err != nil {
@@ -38,12 +40,11 @@ func Home(ctx *middleware.Context) {
}
}
ctx.Data["Repos"] = repos
- ctx.Data["PageIsHome"] = true
ctx.HTML(200, "home")
}
func NotFound(ctx *middleware.Context) {
- ctx.Data["PageIsNotFound"] = true
ctx.Data["Title"] = "Page Not Found"
+ ctx.Data["PageIsNotFound"] = true
ctx.Handle(404, "home.NotFound", nil)
}