summaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2018-07-05 16:35:42 +0100
committerJonas Franz <info@jonasfranz.software>2018-07-05 17:35:42 +0200
commit5bc8782d33d81681ba18a4ec262a51d856e9975f (patch)
tree5eae461d329b68bdaf25a1d704fce1e51c54a30e /templates/admin
parente07d3ad0fcdb27f27fb063c287ce5b0f60724286 (diff)
downloadgitea-5bc8782d33d81681ba18a4ec262a51d856e9975f.tar.gz
gitea-5bc8782d33d81681ba18a4ec262a51d856e9975f.zip
Don't display buttons if there are no system notifications (#4280)
* Don't display buttons if there are no notices * remove redundant gt check
Diffstat (limited to 'templates/admin')
-rw-r--r--templates/admin/notice.tmpl50
1 files changed, 26 insertions, 24 deletions
diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl
index 745433d180..b1d886be42 100644
--- a/templates/admin/notice.tmpl
+++ b/templates/admin/notice.tmpl
@@ -34,33 +34,35 @@
</tr>
{{end}}
</tbody>
- <tfoot class="full-width">
- <tr>
- <th></th>
- <th colspan="5">
- <div class="ui right">
- <a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
- </div>
- <div class="ui floating upward dropdown small button">
- <span class="text">{{.i18n.Tr "admin.notices.actions"}}</span>
- <div class="menu">
- <div class="item select action" data-action="select-all">
- {{.i18n.Tr "admin.notices.select_all"}}
+ {{ if .Notices }}
+ <tfoot class="full-width">
+ <tr>
+ <th></th>
+ <th colspan="5">
+ <div class="ui right">
+ <a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
</div>
- <div class="item select action" data-action="deselect-all">
- {{.i18n.Tr "admin.notices.deselect_all"}}
+ <div class="ui floating upward dropdown small button">
+ <span class="text">{{.i18n.Tr "admin.notices.actions"}}</span>
+ <div class="menu">
+ <div class="item select action" data-action="select-all">
+ {{.i18n.Tr "admin.notices.select_all"}}
+ </div>
+ <div class="item select action" data-action="deselect-all">
+ {{.i18n.Tr "admin.notices.deselect_all"}}
+ </div>
+ <div class="item select action" data-action="inverse">
+ {{.i18n.Tr "admin.notices.inverse_selection"}}
+ </div>
+ </div>
</div>
- <div class="item select action" data-action="inverse">
- {{.i18n.Tr "admin.notices.inverse_selection"}}
+ <div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}">
+ {{.i18n.Tr "admin.notices.delete_selected"}}
</div>
- </div>
- </div>
- <div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}">
- {{.i18n.Tr "admin.notices.delete_selected"}}
- </div>
- </th>
- </tr>
- </tfoot>
+ </th>
+ </tr>
+ </tfoot>
+ {{ end }}
</table>
</div>