summaryrefslogtreecommitdiffstats
path: root/routers/repo/branch.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-06-22 23:11:12 -0400
committerUnknown <joe2010xtmf@163.com>2014-06-22 23:11:12 -0400
commit314193029a246c2498c6d54c085d57f7589c8dbe (patch)
tree302cacb210a972d8050dbf1882a89c5ace1e6218 /routers/repo/branch.go
parent9c820730918443ca2b498dfa71b3131d73cec526 (diff)
downloadgitea-314193029a246c2498c6d54c085d57f7589c8dbe.tar.gz
gitea-314193029a246c2498c6d54c085d57f7589c8dbe.zip
Use constants to name template file
Diffstat (limited to 'routers/repo/branch.go')
-rw-r--r--routers/repo/branch.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/routers/repo/branch.go b/routers/repo/branch.go
index 2e2ae69254..9bad7289b9 100644
--- a/routers/repo/branch.go
+++ b/routers/repo/branch.go
@@ -7,22 +7,27 @@ package repo
import (
"github.com/go-martini/martini"
+ "github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/middleware"
)
+const (
+ BRANCH base.TplName = "repo/branch"
+)
+
func Branches(ctx *middleware.Context, params martini.Params) {
ctx.Data["Title"] = "Branches"
ctx.Data["IsRepoToolbarBranches"] = true
brs, err := ctx.Repo.GitRepo.GetBranches()
if err != nil {
- ctx.Handle(500, "repo.Branches", err)
+ ctx.Handle(500, "repo.Branches(GetBranches)", err)
return
} else if len(brs) == 0 {
- ctx.Handle(404, "repo.Branches", nil)
+ ctx.Handle(404, "repo.Branches(GetBranches)", nil)
return
}
ctx.Data["Branches"] = brs
- ctx.HTML(200, "repo/branches")
+ ctx.HTML(200, BRANCH)
}