Add checkbox to search for all the branches by commit message (#813)

and updating the vendor directory
This commit is contained in:
Zsombor 2017-02-05 15:43:28 +01:00 committed by Lunny Xiao
parent f35b20b042
commit e388db311b
9 changed files with 39 additions and 18 deletions

View file

@ -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()