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.

66 lines
2.8 KiB

  1. {{template "base/head" .}}
  2. <div class="admin user">
  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. <div class="ui right">
  11. <a class="ui red tiny button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.empty_all"}}</a>
  12. </div>
  13. </h4>
  14. <div class="ui attached table segment">
  15. <table class="ui very basic striped table">
  16. <thead>
  17. <tr>
  18. <th>ID</th>
  19. <th>{{.i18n.Tr "admin.notices.type"}}</th>
  20. <th>{{.i18n.Tr "admin.notices.desc"}}</th>
  21. <th>{{.i18n.Tr "admin.users.created"}}</th>
  22. <th>{{.i18n.Tr "admin.notices.op"}}</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. {{range .Notices}}
  27. <tr>
  28. <td>{{.Id}}</td>
  29. <td>{{$.i18n.Tr .TrStr}}</td>
  30. <td><span>{{.Description}}</span></td>
  31. <td>{{.Created}}</td>
  32. <td><a href="{{AppSubUrl}}/admin/notices/{{.Id}}/delete"><i class="fa fa-trash-o text-red"></i></a></td>
  33. </tr>
  34. {{end}}
  35. </tbody>
  36. </table>
  37. </div>
  38. {{with .Page}}
  39. {{if gt .TotalPages 1}}
  40. <div class="center page buttons">
  41. <div class="ui borderless pagination menu">
  42. <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
  43. <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
  44. <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
  45. </a>
  46. {{range .Pages}}
  47. {{if eq .Num -1}}
  48. <a class="disabled item">...</a>
  49. {{else}}
  50. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
  51. {{end}}
  52. {{end}}
  53. <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
  54. {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
  55. </a>
  56. <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>
  57. </div>
  58. </div>
  59. {{end}}
  60. {{end}}
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. {{template "base/footer" .}}