Show branches in repo viewer

This commit is contained in:
Unknown 2014-03-16 23:43:22 -04:00
parent 7015c3d491
commit 685631627e
5 changed files with 43 additions and 17 deletions

View file

@ -33,6 +33,13 @@ func Single(ctx *middleware.Context, params martini.Params) {
ctx.Data["Reponame"] = params["reponame"]
ctx.Data["Branchname"] = params["branchname"]
brs, err := models.GetBranches(params["username"], params["reponame"])
if err != nil {
ctx.Handle(200, "repo.Single", err)
return
}
ctx.Data["Branches"] = brs
var treenames []string
Paths := make([]string, 0)