|
34 | 34 | </tr>
|
35 | 35 | {{end}}
|
36 | 36 | </tbody>
|
37 |
| - <tfoot class="full-width"> |
38 |
| - <tr> |
39 |
| - <th></th> |
40 |
| - <th colspan="5"> |
41 |
| - <div class="ui right"> |
42 |
| - <a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a> |
43 |
| - </div> |
44 |
| - <div class="ui floating upward dropdown small button"> |
45 |
| - <span class="text">{{.i18n.Tr "admin.notices.actions"}}</span> |
46 |
| - <div class="menu"> |
47 |
| - <div class="item select action" data-action="select-all"> |
48 |
| - {{.i18n.Tr "admin.notices.select_all"}} |
| 37 | + {{ if gt (len .Notices) 0 }} |
| 38 | + <tfoot class="full-width"> |
| 39 | + <tr> |
| 40 | + <th></th> |
| 41 | + <th colspan="5"> |
| 42 | + <div class="ui right"> |
| 43 | + <a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a> |
49 | 44 | </div>
|
50 |
| - <div class="item select action" data-action="deselect-all"> |
51 |
| - {{.i18n.Tr "admin.notices.deselect_all"}} |
| 45 | + <div class="ui floating upward dropdown small button"> |
| 46 | + <span class="text">{{.i18n.Tr "admin.notices.actions"}}</span> |
| 47 | + <div class="menu"> |
| 48 | + <div class="item select action" data-action="select-all"> |
| 49 | + {{.i18n.Tr "admin.notices.select_all"}} |
| 50 | + </div> |
| 51 | + <div class="item select action" data-action="deselect-all"> |
| 52 | + {{.i18n.Tr "admin.notices.deselect_all"}} |
| 53 | + </div> |
| 54 | + <div class="item select action" data-action="inverse"> |
| 55 | + {{.i18n.Tr "admin.notices.inverse_selection"}} |
| 56 | + </div> |
| 57 | + </div> |
52 | 58 | </div>
|
53 |
| - <div class="item select action" data-action="inverse"> |
54 |
| - {{.i18n.Tr "admin.notices.inverse_selection"}} |
| 59 | + <div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}"> |
| 60 | + {{.i18n.Tr "admin.notices.delete_selected"}} |
55 | 61 | </div>
|
56 |
| - </div> |
57 |
| - </div> |
58 |
| - <div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}"> |
59 |
| - {{.i18n.Tr "admin.notices.delete_selected"}} |
60 |
| - </div> |
61 |
| - </th> |
62 |
| - </tr> |
63 |
| - </tfoot> |
| 62 | + </th> |
| 63 | + </tr> |
| 64 | + </tfoot> |
| 65 | + {{ end }} |
64 | 66 | </table>
|
65 | 67 | </div>
|
66 | 68 |
|
|
0 commit comments