Don't display buttons if there are no system notifications (#4280)

* Don't display buttons if there are no notices

* remove redundant gt check
tokarchuk/v1.17
Lanre Adelowo 7 years ago committed by Jonas Franz
parent e07d3ad0fc
commit 5bc8782d33
  1. 50
      templates/admin/notice.tmpl

@ -34,33 +34,35 @@
</tr> </tr>
{{end}} {{end}}
</tbody> </tbody>
<tfoot class="full-width"> {{ if .Notices }}
<tr> <tfoot class="full-width">
<th></th> <tr>
<th colspan="5"> <th></th>
<div class="ui right"> <th colspan="5">
<a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a> <div class="ui right">
</div> <a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
<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>
<div class="item select action" data-action="deselect-all"> <div class="ui floating upward dropdown small button">
{{.i18n.Tr "admin.notices.deselect_all"}} <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>
<div class="item select action" data-action="inverse"> <div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}">
{{.i18n.Tr "admin.notices.inverse_selection"}} {{.i18n.Tr "admin.notices.delete_selected"}}
</div> </div>
</div> </th>
</div> </tr>
<div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}"> </tfoot>
{{.i18n.Tr "admin.notices.delete_selected"}} {{ end }}
</div>
</th>
</tr>
</tfoot>
</table> </table>
</div> </div>

Loading…
Cancel
Save