list.tmpl 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. <th>{{.i18n.Tr "admin.notices.op"}}</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. {{range .Repos}}
  28. <tr>
  29. <td>{{.ID}}</td>
  30. <td><a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
  31. <td><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
  32. <td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
  33. <td>{{.NumWatches}}</td>
  34. <td>{{.NumStars}}</td>
  35. <td>{{.NumIssues}}</td>
  36. <td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
  37. <td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Current}}" data-id="{{.ID}}"><i class="trash icon text red"></i></a></td>
  38. </tr>
  39. {{end}}
  40. </tbody>
  41. </table>
  42. </div>
  43. {{with .Page}}
  44. {{if gt .TotalPages 1}}
  45. <div class="center page buttons">
  46. <div class="ui borderless pagination menu">
  47. <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
  48. <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
  49. <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
  50. </a>
  51. {{range .Pages}}
  52. {{if eq .Num -1}}
  53. <a class="disabled item">...</a>
  54. {{else}}
  55. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
  56. {{end}}
  57. {{end}}
  58. <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
  59. {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
  60. </a>
  61. <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>
  62. </div>
  63. </div>
  64. {{end}}
  65. {{end}}
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="ui small basic delete modal">
  71. <div class="ui icon header">
  72. <i class="trash icon"></i>
  73. {{.i18n.Tr "repo.settings.delete"}}
  74. </div>
  75. <div class="content">
  76. <p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
  77. <p>{{.i18n.Tr "repo.settings.delete_notices_2"}}</p>
  78. <p>{{.i18n.Tr "repo.settings.delete_notices_fork_1"}}</p>
  79. <p>{{.i18n.Tr "repo.settings.delete_notices_fork_2"}}</p>
  80. <p>{{.i18n.Tr "repo.settings.delete_notices_fork_3"}}</p>
  81. </div>
  82. {{template "base/delete_modal_actions" .}}
  83. </div>
  84. {{template "base/footer" .}}