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

@ -53,6 +53,7 @@ func Commits(ctx *context.Context) {
ctx.Handle(404, "Commit not found", nil)
return
}
ctx.Data["PageIsViewCode"] = true
commitsCount, err := ctx.Repo.Commit.CommitsCount()
if err != nil {
@ -88,6 +89,7 @@ func Commits(ctx *context.Context) {
// Graph render commit graph - show commits from all branches.
func Graph(ctx *context.Context) {
ctx.Data["PageIsCommits"] = true
ctx.Data["PageIsViewCode"] = true
commitsCount, err := ctx.Repo.Commit.CommitsCount()
if err != nil {
@ -114,6 +116,7 @@ func Graph(ctx *context.Context) {
// SearchCommits render commits filtered by keyword
func SearchCommits(ctx *context.Context) {
ctx.Data["PageIsCommits"] = true
ctx.Data["PageIsViewCode"] = true
keyword := strings.Trim(ctx.Query("q"), " ")
if len(keyword) == 0 {