gitea源码

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 tw-w-4/5"><span class="notice-description">{{.Description}}</span></td>
  24. <td nowrap>{{DateUtils.AbsoluteShort .CreatedUnix}}</td>
  25. <td class="view-detail"><a href="#">{{svg "octicon-note" 16}}</a></td>
  26. </tr>
  27. {{else}}
  28. <tr><td class="tw-text-center" colspan="6">{{ctx.Locale.Tr "no_results_found"}}</td></tr>
  29. {{end}}
  30. </tbody>
  31. {{if .Notices}}
  32. <tfoot>
  33. <tr>
  34. <th></th>
  35. <th colspan="5">
  36. <form class="tw-float-right" method="post" action="{{AppSubUrl}}/-/admin/notices/empty">
  37. {{.CsrfTokenHtml}}
  38. <button type="submit" class="ui red small button">{{ctx.Locale.Tr "admin.notices.delete_all"}}</button>
  39. </form>
  40. <div class="ui floating upward dropdown small button">{{/* TODO: Make this dropdown accessible */}}
  41. <span class="text">{{ctx.Locale.Tr "admin.notices.operations"}}</span>
  42. <div class="menu">
  43. <div class="item select action" data-action="select-all">
  44. {{ctx.Locale.Tr "admin.notices.select_all"}}
  45. </div>
  46. <div class="item select action" data-action="deselect-all">
  47. {{ctx.Locale.Tr "admin.notices.deselect_all"}}
  48. </div>
  49. <div class="item select action" data-action="inverse">
  50. {{ctx.Locale.Tr "admin.notices.inverse_selection"}}
  51. </div>
  52. </div>
  53. </div>
  54. <button class="ui small button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="?page={{.Page.Paginater.Current}}">
  55. <span class="text">{{ctx.Locale.Tr "admin.notices.delete_selected"}}</span>
  56. </button>
  57. </th>
  58. </tr>
  59. </tfoot>
  60. {{end}}
  61. </table>
  62. {{template "base/paginate" .}}
  63. </div>
  64. <div class="ui modal admin" id="detail-modal">
  65. <div class="header">{{ctx.Locale.Tr "admin.notices.view_detail_header"}}</div>
  66. <div class="content"><pre></pre></div>
  67. </div>
  68. {{template "admin/layout_footer" .}}