list.tmpl 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
  10. <div class="ui right">
  11. <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</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.users.name"}}</th>
  20. <th>{{.i18n.Tr "email"}}</th>
  21. <th>{{.i18n.Tr "admin.users.activated"}}</th>
  22. <th>{{.i18n.Tr "admin.users.admin"}}</th>
  23. <th>{{.i18n.Tr "admin.users.repos"}}</th>
  24. <th>{{.i18n.Tr "admin.users.created"}}</th>
  25. <th>{{.i18n.Tr "admin.users.edit"}}</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. {{range .Users}}
  30. <tr>
  31. <td>{{.Id}}</td>
  32. <td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
  33. <td><span class="text truncate email">{{.Email}}</span></td>
  34. <td><i class="fa fa{{if .IsActive}}-check{{end}}-square-o"></i></td>
  35. <td><i class="fa fa{{if .IsAdmin}}-check{{end}}-square-o"></i></td>
  36. <td>{{.NumRepos}}</td>
  37. <td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created }}</span></td>
  38. <td><a href="{{AppSubUrl}}/admin/users/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
  39. </tr>
  40. {{end}}
  41. </tbody>
  42. </table>
  43. </div>
  44. {{with .Page}}
  45. {{if gt .TotalPages 1}}
  46. <div class="center page buttons">
  47. <div class="ui borderless pagination menu">
  48. <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
  49. <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
  50. <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
  51. </a>
  52. {{range .Pages}}
  53. {{if eq .Num -1}}
  54. <a class="disabled item">...</a>
  55. {{else}}
  56. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
  57. {{end}}
  58. {{end}}
  59. <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
  60. {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
  61. </a>
  62. <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>
  63. </div>
  64. </div>
  65. {{end}}
  66. {{end}}
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. {{template "base/footer" .}}