mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Fixed #209
This commit is contained in:
parent
87854c95a9
commit
688ec6ecbd
37 changed files with 693 additions and 482 deletions
|
@ -11,9 +11,12 @@ import (
|
|||
)
|
||||
|
||||
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(404, "repo.Branches", err)
|
||||
ctx.Handle(500, "repo.Branches", err)
|
||||
return
|
||||
} else if len(brs) == 0 {
|
||||
ctx.Handle(404, "repo.Branches", nil)
|
||||
|
@ -21,7 +24,5 @@ func Branches(ctx *middleware.Context, params martini.Params) {
|
|||
}
|
||||
|
||||
ctx.Data["Branches"] = brs
|
||||
ctx.Data["IsRepoToolbarBranches"] = true
|
||||
|
||||
ctx.HTML(200, "repo/branches")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue