diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-12-04 22:48:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 15:48:42 -0600 |
commit | b3c258828f11d6c5900f8209a46ea93482c93519 (patch) | |
tree | 69db7a42dfb8a82be7ea734223f06f80277f5425 /templates/repo/issue | |
parent | ec1feedbf582b05b6a5e8c59fb2457f25d053ba2 (diff) | |
download | gitea-b3c258828f11d6c5900f8209a46ea93482c93519.tar.gz gitea-b3c258828f11d6c5900f8209a46ea93482c93519.zip |
Refactor template empty checks (#28351)
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/filters.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/issue/filters.tmpl b/templates/repo/issue/filters.tmpl index 1d200e23b7..56c65e2401 100644 --- a/templates/repo/issue/filters.tmpl +++ b/templates/repo/issue/filters.tmpl @@ -1,6 +1,6 @@ <div id="issue-filters" class="issue-list-toolbar"> <div class="issue-list-toolbar-left"> - {{if and ($.CanWriteIssuesOrPulls) (gt (len .Issues) 0)}} + {{if and $.CanWriteIssuesOrPulls .Issues}} <input type="checkbox" autocomplete="off" class="issue-checkbox-all gt-mr-4" title="{{ctx.Locale.Tr "repo.issues.action_check_all"}}"> {{end}} {{template "repo/issue/openclose" .}} diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 4be1f52dd5..c81cc5c10a 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -339,7 +339,7 @@ </div> </div> {{end}} - {{if gt (len .WorkingUsers) 0}} + {{if .WorkingUsers}} <div class="divider"></div> <div class="ui comments"> <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span> |