list.tmpl 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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.repos.repo_manage_panel"}} ({{.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.repos.owner"}}</th>
  17. <th>{{.i18n.Tr "admin.repos.name"}}</th>
  18. <th>{{.i18n.Tr "admin.repos.private"}}</th>
  19. <th>{{.i18n.Tr "admin.repos.watches"}}</th>
  20. <th>{{.i18n.Tr "admin.repos.stars"}}</th>
  21. <th>{{.i18n.Tr "admin.repos.issues"}}</th>
  22. <th>{{.i18n.Tr "admin.users.created"}}</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. {{range .Repos}}
  27. <tr>
  28. <td>{{.ID}}</td>
  29. <td><a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
  30. <td><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
  31. <td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
  32. <td>{{.NumWatches}}</td>
  33. <td>{{.NumStars}}</td>
  34. <td>{{.NumIssues}}</td>
  35. <td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
  36. </tr>
  37. {{end}}
  38. </tbody>
  39. </table>
  40. </div>
  41. {{with .Page}}
  42. {{if gt .TotalPages 1}}
  43. <div class="center page buttons">
  44. <div class="ui borderless pagination menu">
  45. <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
  46. <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
  47. <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
  48. </a>
  49. {{range .Pages}}
  50. {{if eq .Num -1}}
  51. <a class="disabled item">...</a>
  52. {{else}}
  53. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
  54. {{end}}
  55. {{end}}
  56. <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
  57. {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
  58. </a>
  59. <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>
  60. </div>
  61. </div>
  62. {{end}}
  63. {{end}}
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. {{template "base/footer" .}}