mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-15 22:42:43 +00:00
Add checkbox to search for all the branches by commit message (#813)
and updating the vendor directory
This commit is contained in:
parent
f35b20b042
commit
e388db311b
9 changed files with 39 additions and 18 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue