notice.tmpl 2.6 KB

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