Skip to content

Commit e388db3

Browse files
gzsomborlunny
authored andcommitted
Add checkbox to search for all the branches by commit message (#813)
and updating the vendor directory
1 parent f35b20b commit e388db3

File tree

9 files changed

+39
-18
lines changed

9 files changed

+39
-18
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ editor.upload_files_to_dir = Upload files to '%s'
513513

514514
commits.commits = Commits
515515
commits.search = Search commits
516+
commits.search_all = All
516517
commits.find = Find
517518
commits.author = Author
518519
commits.message = Message

routers/repo/commit.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ func SearchCommits(ctx *context.Context) {
111111
ctx.Redirect(ctx.Repo.RepoLink + "/commits/" + ctx.Repo.BranchName)
112112
return
113113
}
114+
all := ctx.QueryBool("all")
114115

115-
commits, err := ctx.Repo.Commit.SearchCommits(keyword)
116+
commits, err := ctx.Repo.Commit.SearchCommits(keyword, all)
116117
if err != nil {
117118
ctx.Handle(500, "SearchCommits", err)
118119
return
@@ -122,6 +123,9 @@ func SearchCommits(ctx *context.Context) {
122123
ctx.Data["Commits"] = commits
123124

124125
ctx.Data["Keyword"] = keyword
126+
if all {
127+
ctx.Data["All"] = "checked"
128+
}
125129
ctx.Data["Username"] = ctx.Repo.Owner.Name
126130
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
127131
ctx.Data["CommitCount"] = commits.Len()

templates/repo/commits_table.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<div class="ui tiny search input">
77
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
88
</div>
9+
<input type="checkbox" name="all" id="all" value="true" {{.All}}><label for="all">{{.i18n.Tr "repo.commits.search_all"}}</label>
910
<button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button>
1011
</form>
1112
</div>

vendor/code.gitea.io/git/CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/code.gitea.io/git/MAINTAINERS

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/code.gitea.io/git/commit.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/code.gitea.io/git/repo_branch.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/code.gitea.io/git/repo_commit.go

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/vendor.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"ignore": "test",
44
"package": [
55
{
6-
"checksumSHA1": "P2wIRW07gnEgqLZAcg7bz+Jw9Oc=",
6+
"checksumSHA1": "km1AOUs34DCwgXT55fh6PrkPdiU=",
77
"path": "code.gitea.io/git",
8-
"revision": "7477742b3c79d36d099baaf614864b6bbdfdecca",
9-
"revisionTime": "2017-01-09T15:46:57Z"
8+
"revision": "dd951bf625ebf5c16ef403f681aaec6c34324bca",
9+
"revisionTime": "2017-02-05T02:50:57Z"
1010
},
1111
{
1212
"checksumSHA1": "BKj0haFTDebzdC2nACpoGzp3s8A=",

0 commit comments

Comments
 (0)