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.

100 lines
3.7 KiB

  1. {{template "base/head" .}}
  2. <div class="admin notice">
  3. {{template "admin/navbar" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <h4 class="ui top attached header">
  7. {{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
  8. </h4>
  9. <div class="ui attached table segment">
  10. <table class="ui very basic select selectable table">
  11. <thead>
  12. <tr>
  13. <th></th>
  14. <th>ID</th>
  15. <th>{{.i18n.Tr "admin.notices.type"}}</th>
  16. <th>{{.i18n.Tr "admin.notices.desc"}}</th>
  17. <th width="100px">{{.i18n.Tr "admin.users.created"}}</th>
  18. <th>{{.i18n.Tr "admin.notices.op"}}</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. {{range .Notices}}
  23. <tr>
  24. <td class="collapsing">
  25. <div class="ui fitted checkbox" data-id="{{.ID}}">
  26. <input type="checkbox"> <label></label>
  27. </div>
  28. </td>
  29. <td>{{.ID}}</td>
  30. <td>{{$.i18n.Tr .TrStr}}</td>
  31. <td>{{SubStr .Description 0 120}}...</td>
  32. <td><span class="poping up" data-content="{{.Created}}" data-variation="inverted tiny">{{DateFmtShort .Created}}</span></td>
  33. <td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td>
  34. </tr>
  35. {{end}}
  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"}}
  49. </div>
  50. <div class="item select action" data-action="deselect-all">
  51. {{.i18n.Tr "admin.notices.deselect_all"}}
  52. </div>
  53. <div class="item select action" data-action="inverse">
  54. {{.i18n.Tr "admin.notices.inverse_selection"}}
  55. </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>
  64. </table>
  65. </div>
  66. {{with .Page}}
  67. {{if gt .TotalPages 1}}
  68. <div class="center page buttons">
  69. <div class="ui borderless pagination menu">
  70. <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
  71. <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
  72. <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
  73. </a>
  74. {{range .Pages}}
  75. {{if eq .Num -1}}
  76. <a class="disabled item">...</a>
  77. {{else}}
  78. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
  79. {{end}}
  80. {{end}}
  81. <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
  82. {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
  83. </a>
  84. <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
  85. </div>
  86. </div>
  87. {{end}}
  88. {{end}}
  89. </div>
  90. </div>
  91. <div class="ui modal" id="detail-modal">
  92. <i class="close icon"></i>
  93. <div class="header">{{$.i18n.Tr "admin.notices.view_detail_header"}}</div>
  94. <div class="content">
  95. <p></p>
  96. </div>
  97. </div>
  98. {{template "base/footer" .}}