Skip to content

Commit

Permalink
Merge branch 'main' into appleboy-schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot authored Aug 24, 2023
2 parents 860e2a7 + 7e30986 commit 7e3e206
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions routers/web/repo/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ func Commits(ctx *context.Context) {
ctx.Data["Username"] = ctx.Repo.Owner.Name
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
ctx.Data["CommitCount"] = commitsCount
ctx.Data["RefName"] = ctx.Repo.RefName

pager := context.NewPagination(int(commitsCount), pageSize, page, 5)
pager.SetDefaultParams(ctx)
Expand Down Expand Up @@ -157,7 +156,7 @@ func Graph(ctx *context.Context) {
ctx.Data["Username"] = ctx.Repo.Owner.Name
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
ctx.Data["CommitCount"] = commitsCount
ctx.Data["RefName"] = ctx.Repo.RefName

paginator := context.NewPagination(int(graphCommitsCount), setting.UI.GraphMaxCommitNum, page, 5)
paginator.AddParam(ctx, "mode", "Mode")
paginator.AddParam(ctx, "hide-pr-refs", "HidePRRefs")
Expand Down Expand Up @@ -203,7 +202,6 @@ func SearchCommits(ctx *context.Context) {
}
ctx.Data["Username"] = ctx.Repo.Owner.Name
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
ctx.Data["RefName"] = ctx.Repo.RefName
ctx.HTML(http.StatusOK, tplCommits)
}

Expand Down Expand Up @@ -247,7 +245,6 @@ func FileHistory(ctx *context.Context) {
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
ctx.Data["FileName"] = fileName
ctx.Data["CommitCount"] = commitsCount
ctx.Data["RefName"] = ctx.Repo.RefName

pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5)
pager.SetDefaultParams(ctx)
Expand Down
6 changes: 3 additions & 3 deletions templates/repo/commits_table.tmpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h4 class="ui top attached header commits-table gt-df gt-ac gt-sb">
<div class="commits-table-left gt-df gt-ac">
{{if or .PageIsCommits (gt .CommitCount 0)}}
{{.CommitCount}} {{.locale.Tr "repo.commits.commits"}} {{if .RefName}}({{.RefName}}){{end}}
{{.CommitCount}} {{.locale.Tr "repo.commits.commits"}}
{{else if .IsNothingToCompare}}
{{.locale.Tr "repo.commits.nothing_to_compare"}} {{if .RefName}}({{.RefName}}){{end}}
{{.locale.Tr "repo.commits.nothing_to_compare"}}
{{else}}
{{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}}
{{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}}
{{end}}
</div>
<div class="commits-table-right gt-whitespace-nowrap">
Expand Down

0 comments on commit 7e3e206

Please sign in to comment.