mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fixed commit count. (#17698)
Added "Tag" label. Unified branch, tag and commit name.
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
{{if $release}}
|
||||
{{.root.i18n.Tr "repo.release.compare"}}
|
||||
{{else}}
|
||||
{{svg "octicon-git-branch"}}
|
||||
{{if .root.IsViewBranch}}{{.root.i18n.Tr "repo.branch"}}{{else}}{{.root.i18n.Tr "repo.tree"}}{{end}}:
|
||||
<strong>{{if .root.IsViewBranch}}{{.root.BranchName}}{{else}}{{ShortSha .root.BranchName}}{{end}}</strong>
|
||||
{{if .root.IsViewTag}}{{svg "octicon-tag"}}{{else}}{{svg "octicon-git-branch"}}{{end}}
|
||||
{{if .root.IsViewBranch}}{{.root.i18n.Tr "repo.branch"}}{{else if .root.IsViewTag}}{{.root.i18n.Tr "repo.tag"}}{{else}}{{.root.i18n.Tr "repo.tree"}}{{end}}:
|
||||
<strong>{{if .root.IsViewBranch}}{{.root.BranchName}}{{else if .root.IsViewTag}}{{.root.TagName}}{{else}}{{ShortSha .root.CommitID}}{{end}}</strong>
|
||||
{{end}}
|
||||
</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
@@ -66,8 +66,10 @@
|
||||
<div class="text small">
|
||||
{{if or .root.IsViewBranch $release}}
|
||||
{{.root.i18n.Tr "repo.branch.create_from" .root.BranchName}}
|
||||
{{else if .root.IsViewTag}}
|
||||
{{.root.i18n.Tr "repo.branch.create_from" .root.TagName}}
|
||||
{{else}}
|
||||
{{.root.i18n.Tr "repo.branch.create_from" (ShortSha .root.BranchName)}}
|
||||
{{.root.i18n.Tr "repo.branch.create_from" (ShortSha .root.CommitID)}}
|
||||
{{end}}
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -1,12 +1,11 @@
|
||||
<h4 class="ui top attached header commits-table df ac sb">
|
||||
<div class="commits-table-left df ac">
|
||||
{{if or .PageIsCommits (gt .CommitCount 0)}}
|
||||
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
|
||||
{{else if .IsNothingToCompare }}
|
||||
{{.i18n.Tr "repo.commits.nothing_to_compare" }} {{if .Branch}}({{.Branch}}){{end}}
|
||||
|
||||
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .RefName}}({{.RefName}}){{end}}
|
||||
{{else if .IsNothingToCompare}}
|
||||
{{.i18n.Tr "repo.commits.nothing_to_compare" }} {{if .RefName}}({{.RefName}}){{end}}
|
||||
{{else}}
|
||||
{{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch }} {{if .Branch}}({{.Branch}}){{end}}
|
||||
{{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="commits-table-right df ac">
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<div class="ui two horizontal center link list">
|
||||
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}
|
||||
<div class="item{{if .PageIsCommits}} active{{end}}">
|
||||
<a class="ui" href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{PathEscapeSegments .BranchName}}">{{svg "octicon-history"}} <b>{{.CommitsCount}}</b> {{.i18n.Tr (TrN .i18n.Lang .CommitsCount "repo.commit" "repo.commits") }}</a>
|
||||
<a class="ui" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">{{svg "octicon-history"}} <b>{{.CommitsCount}}</b> {{.i18n.Tr (TrN .i18n.Lang .CommitsCount "repo.commit" "repo.commits") }}</a>
|
||||
</div>
|
||||
<div class="item{{if .PageIsBranches}} active{{end}}">
|
||||
<a class="ui" href="{{.RepoLink}}/branches">{{svg "octicon-git-branch"}} <b>{{.BranchesCount}}</b> {{.i18n.Tr (TrN .i18n.Lang .BranchesCount "repo.branch" "repo.branches") }}</a>
|
||||
|
Reference in New Issue
Block a user