summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorZsombor <gzsombor@users.noreply.github.com>2017-02-05 15:43:28 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-05 22:43:28 +0800
commite388db311b63d7b1baf640f1aece74e86ffd665f (patch)
tree226d9ede379ddef6f5ccf9bc2e991a7a89511b14 /routers
parentf35b20b04212b2085d44d34933c04c4fd30d3a08 (diff)
downloadgitea-e388db311b63d7b1baf640f1aece74e86ffd665f.tar.gz
gitea-e388db311b63d7b1baf640f1aece74e86ffd665f.zip
Add checkbox to search for all the branches by commit message (#813)
and updating the vendor directory
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/commit.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index 43db9e4480..f165ed8525 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -111,8 +111,9 @@ func SearchCommits(ctx *context.Context) {
ctx.Redirect(ctx.Repo.RepoLink + "/commits/" + ctx.Repo.BranchName)
return
}
+ all := ctx.QueryBool("all")
- commits, err := ctx.Repo.Commit.SearchCommits(keyword)
+ commits, err := ctx.Repo.Commit.SearchCommits(keyword, all)
if err != nil {
ctx.Handle(500, "SearchCommits", err)
return
@@ -122,6 +123,9 @@ func SearchCommits(ctx *context.Context) {
ctx.Data["Commits"] = commits
ctx.Data["Keyword"] = keyword
+ if all {
+ ctx.Data["All"] = "checked"
+ }
ctx.Data["Username"] = ctx.Repo.Owner.Name
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
ctx.Data["CommitCount"] = commits.Len()