aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2020-01-23 17:24:06 -0500
committerThedro Neely <thedroneely@gmail.com>2020-01-23 17:24:06 -0500
commitca61038c9f7fb4627d380906ccd12bc64227fb5a (patch)
treee9426c8be1e2d184dccce92975cc90068d53fdee
parent4e40a1554f44aee39609303f53d22ee343382456 (diff)
downloadgitea-templates-ca61038c9f7fb4627d380906ccd12bc64227fb5a.tar.gz
gitea-templates-ca61038c9f7fb4627d380906ccd12bc64227fb5a.tar.bz2
gitea-templates-ca61038c9f7fb4627d380906ccd12bc64227fb5a.zip
templates/repo/header: Default to zero commits and branches
-rw-r--r--templates/repo/header.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 49a2d28..2e00023 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -93,13 +93,13 @@
<a class="{{if .PageIsCommits}}active{{end}} item"
href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{EscapePound .BranchName}}">
{{.i18n.Tr "repo.commits"}}
- <span class="ui small label">{{.CommitsCount}}</span>
+ <span class="ui small label">{{or .CommitsCount "0"}}</span>
</a>
<a class="{{if .PageIsBranches}}active{{end}} item"
href="{{.RepoLink}}/branches/">
{{.i18n.Tr "repo.branches"}}
- <span class="ui small label">{{.BranchesCount}}</span>
+ <span class="ui small label">{{or .BranchesCount "0"}}</span>
</a>
{{end}}