diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-11-18 00:50:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 00:50:17 +0100 |
commit | ea42d3c04ef48b9ff0354ea196179d1a5025c04a (patch) | |
tree | 8a95df877dae7a5cf62364a525cc532205d5d188 /templates/repo/branch_dropdown.tmpl | |
parent | Add .gitattribute assisted language detection to blame, diff and render (#17590) (diff) | |
download | forgejo-ea42d3c04ef48b9ff0354ea196179d1a5025c04a.tar.xz forgejo-ea42d3c04ef48b9ff0354ea196179d1a5025c04a.zip |
Fixed commit count. (#17698)
Added "Tag" label.
Unified branch, tag and commit name.
Diffstat (limited to 'templates/repo/branch_dropdown.tmpl')
-rw-r--r-- | templates/repo/branch_dropdown.tmpl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl index a2115729b2..a6120483b5 100644 --- a/templates/repo/branch_dropdown.tmpl +++ b/templates/repo/branch_dropdown.tmpl @@ -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> |