You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

notice.tmpl 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin notice")}}
  2. <div class="admin-setting-content">
  3. <h4 class="ui top attached header">
  4. {{ctx.Locale.Tr "admin.notices.system_notice_list"}} ({{ctx.Locale.Tr "admin.total" .Total}})
  5. </h4>
  6. <table class="ui attached segment select selectable striped table unstackable g-table-auto-ellipsis">
  7. <thead>
  8. <tr>
  9. <th></th>
  10. <th>ID</th>
  11. <th>{{ctx.Locale.Tr "admin.notices.type"}}</th>
  12. <th>{{ctx.Locale.Tr "admin.notices.desc"}}</th>
  13. <th>{{ctx.Locale.Tr "admin.users.created"}}</th>
  14. <th>{{ctx.Locale.Tr "admin.notices.op"}}</th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. {{range .Notices}}
  19. <tr>
  20. <td><div class="ui checkbox tw-flex" data-id="{{.ID}}"><input type="checkbox"></div></td>
  21. <td>{{.ID}}</td>
  22. <td>{{ctx.Locale.Tr .TrStr}}</td>
  23. <td class="view-detail auto-ellipsis" style="width: 80%;"><span class="notice-description">{{.Description}}</span></td>
  24. <td nowrap>{{DateTime "short" .CreatedUnix}}</td>
  25. <td class="view-detail"><a href="#">{{svg "octicon-note" 16}}</a></td>
  26. </tr>
  27. {{end}}
  28. </tbody>
  29. {{if .Notices}}
  30. <tfoot>
  31. <tr>
  32. <th></th>
  33. <th colspan="5">
  34. <form class="tw-float-right" method="post" action="{{AppSubUrl}}/admin/notices/empty">
  35. {{.CsrfTokenHtml}}
  36. <button type="submit" class="ui red small button">{{ctx.Locale.Tr "admin.notices.delete_all"}}</button>
  37. </form>
  38. <div class="ui floating upward dropdown small button">{{/* TODO: Make this dropdown accessible */}}
  39. <span class="text">{{ctx.Locale.Tr "admin.notices.operations"}}</span>
  40. <div class="menu">
  41. <div class="item select action" data-action="select-all">
  42. {{ctx.Locale.Tr "admin.notices.select_all"}}
  43. </div>
  44. <div class="item select action" data-action="deselect-all">
  45. {{ctx.Locale.Tr "admin.notices.deselect_all"}}
  46. </div>
  47. <div class="item select action" data-action="inverse">
  48. {{ctx.Locale.Tr "admin.notices.inverse_selection"}}
  49. </div>
  50. </div>
  51. </div>
  52. <button class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="?page={{.Page.Paginater.Current}}">
  53. <span class="text">{{ctx.Locale.Tr "admin.notices.delete_selected"}}</span>
  54. </button>
  55. </th>
  56. </tr>
  57. </tfoot>
  58. {{end}}
  59. </table>
  60. {{template "base/paginate" .}}
  61. </div>
  62. <div class="ui modal admin" id="detail-modal">
  63. <div class="header">{{ctx.Locale.Tr "admin.notices.view_detail_header"}}</div>
  64. <div class="content">
  65. <div class="sub header"></div>
  66. <pre></pre>
  67. </div>
  68. </div>
  69. {{template "admin/layout_footer" .}}