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.

104 lines
3.9 KiB

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