diff options
author | Morgan Bazalgette <git@howl.moe> | 2018-04-16 07:26:53 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-04-16 08:26:53 +0300 |
commit | 5ba4ba3957f3f646974e1fdeba0d25613f37deb3 (patch) | |
tree | 4134f14ee1fb9afc683dcb82d34be5721697d7c6 /templates/repo/activity.tmpl | |
parent | 804bc0aa2f0c2b22aa16e1f0a3476f223a975491 (diff) | |
download | gitea-5ba4ba3957f3f646974e1fdeba0d25613f37deb3.tar.gz gitea-5ba4ba3957f3f646974e1fdeba0d25613f37deb3.zip |
Fixed 0 closed issues not show 50% closed on activty page (#3802)
Fixes #3656. Also adds a light grey bar when there are both 0 merged
prs/closed issues and 0 open prs/issues.
Diffstat (limited to 'templates/repo/activity.tmpl')
-rw-r--r-- | templates/repo/activity.tmpl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/templates/repo/activity.tmpl b/templates/repo/activity.tmpl index f5454afb93..ed959c5b01 100644 --- a/templates/repo/activity.tmpl +++ b/templates/repo/activity.tmpl @@ -30,9 +30,13 @@ <div class="column"> {{if gt .Activity.ActivePRCount 0}} <div class="stats-table"> - <a href="#merged-pull-requests" class="table-cell tiny background purple" style="width: {{.Activity.MergedPRPerc}}%"></a> + <a href="#merged-pull-requests" class="table-cell tiny background purple" style="width: {{.Activity.MergedPRPerc}}{{if ne .Activity.MergedPRPerc 0}}%{{end}}"></a> <a href="#proposed-pull-requests" class="table-cell tiny background green"></a> </div> + {{else}} + <div class="stats-table"> + <a class="table-cell tiny background light grey"></a> + </div> {{end}} {{.i18n.Tr (TrN .i18n.Lang .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n") .Activity.ActivePRCount | Safe }} </div> @@ -41,9 +45,13 @@ <div class="column"> {{if gt .Activity.ActiveIssueCount 0}} <div class="stats-table"> - <a href="#closed-issues" class="table-cell tiny background red" style="width: {{.Activity.ClosedIssuePerc}}%"></a> + <a href="#closed-issues" class="table-cell tiny background red" style="width: {{.Activity.ClosedIssuePerc}}{{if ne .Activity.ClosedIssuePerc 0}}%{{end}}"></a> <a href="#new-issues" class="table-cell tiny background green"></a> </div> + {{else}} + <div class="stats-table"> + <a class="table-cell tiny background light grey"></a> + </div> {{end}} {{.i18n.Tr (TrN .i18n.Lang .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n") .Activity.ActiveIssueCount | Safe }} </div> |