diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-06-28 15:00:32 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-06-28 15:00:32 +0800 |
commit | a357cda9575b482004329e81f0add6e4c32ab02a (patch) | |
tree | db7d7508a039cfd4dd6cedad236e720bcfe1396c /routers/repo/branch.go | |
parent | 165e3e8f18bb7d38722d0c836ddbf8c95023cf67 (diff) | |
parent | 6e448b07145fbb090e0da6deb97f244c2bfd7ba7 (diff) |
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'routers/repo/branch.go')
-rw-r--r-- | routers/repo/branch.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/routers/repo/branch.go b/routers/repo/branch.go index 2e2ae692..9bad7289 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) } |