Add branch overiew page (#2108)

* Add branch overiew page

* fix changed method name on sub menu

* remove unused code
This commit is contained in:
Bwko 2017-10-26 02:49:16 +02:00 committed by Lunny Xiao
parent e86a0bf3fe
commit 3ab580c8d6
21 changed files with 701 additions and 52 deletions

View file

@ -550,7 +550,10 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/branches", func() {
m.Post("/_new/*", context.RepoRef(), bindIgnErr(auth.NewBranchForm{}), repo.CreateBranch)
}, reqRepoWriter, repo.MustBeNotBare)
m.Post("/delete", repo.DeleteBranchPost)
m.Post("/restore", repo.RestoreBranchPost)
}, reqRepoWriter, repo.MustBeNotBare, context.CheckUnit(models.UnitTypeCode))
}, reqSignIn, context.RepoAssignment(), context.UnitTypes(), context.LoadRepoUnits())
// Releases
@ -615,6 +618,10 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Get("/archive/*", repo.MustBeNotBare, context.CheckUnit(models.UnitTypeCode), repo.Download)
m.Group("/branches", func() {
m.Get("", repo.Branches)
}, repo.MustBeNotBare, context.RepoRef(), context.CheckUnit(models.UnitTypeCode))
m.Group("/pulls/:index", func() {
m.Get("/commits", context.RepoRef(), repo.ViewPullCommits)
m.Get("/files", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.ViewPullFiles)