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.

list.tmpl 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {{template "base/head" .}}
  2. <div class="page-content admin user">
  3. {{template "admin/navbar" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <h4 class="ui top attached header">
  7. {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
  8. <div class="ui right">
  9. <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos/unadopted">{{.i18n.Tr "admin.repos.unadopted"}}</a>
  10. </div>
  11. </h4>
  12. <div class="ui attached segment">
  13. {{template "admin/repo/search" .}}
  14. </div>
  15. <div class="ui attached table segment">
  16. <table class="ui very basic striped table">
  17. <thead>
  18. <tr>
  19. <th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
  20. <th>{{.i18n.Tr "admin.repos.owner"}}</th>
  21. <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
  22. {{.i18n.Tr "admin.repos.name"}}
  23. {{SortArrow "alphabetically" "reversealphabetically" $.SortType false}}
  24. </th>
  25. <th>{{.i18n.Tr "admin.repos.watches"}}</th>
  26. <th data-sortt-asc="moststars" data-sortt-desc="feweststars">
  27. {{.i18n.Tr "admin.repos.stars"}}
  28. {{SortArrow "moststars" "feweststars" $.SortType false}}
  29. </th>
  30. <th data-sortt-asc="mostforks" data-sortt-desc="fewestforks">
  31. {{.i18n.Tr "admin.repos.forks"}}
  32. {{SortArrow "mostforks" "fewestforks" $.SortType false}}
  33. </th>
  34. <th>{{.i18n.Tr "admin.repos.issues"}}</th>
  35. <th data-sortt-asc="size" data-sortt-desc="reversesize">
  36. {{.i18n.Tr "admin.repos.size"}}
  37. {{SortArrow "size" "reversesize" $.SortType false}}
  38. </th>
  39. <th>{{.i18n.Tr "admin.users.created"}}</th>
  40. <th>{{.i18n.Tr "admin.notices.op"}}</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. {{range .Repos}}
  45. <tr>
  46. <td>{{.ID}}</td>
  47. <td>
  48. <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
  49. {{if .Owner.Visibility.IsPrivate}}
  50. <span class="text gold">{{svg "octicon-lock"}}</span>
  51. {{end}}
  52. </td>
  53. <td>
  54. <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
  55. {{if .IsArchived}}
  56. <span class="ui basic mini label">{{$.i18n.Tr "repo.desc.archived"}}</span>
  57. {{end}}
  58. {{if .IsTemplate}}
  59. {{if .IsPrivate}}
  60. <span class="ui basic mini label">{{$.i18n.Tr "repo.desc.private_template"}}</span>
  61. {{else}}
  62. {{if .Owner.Visibility.IsPrivate}}
  63. <span class="ui basic mini label">{{$.i18n.Tr "repo.desc.internal_template"}}</span>
  64. {{end}}
  65. {{end}}
  66. {{else}}
  67. {{if .IsPrivate}}
  68. <span class="ui basic mini label">{{$.i18n.Tr "repo.desc.private"}}</span>
  69. {{else}}
  70. {{if .Owner.Visibility.IsPrivate}}
  71. <span class="ui basic mini label">{{$.i18n.Tr "repo.desc.internal"}}</span>
  72. {{end}}
  73. {{end}}
  74. {{end}}
  75. {{if .IsFork}}
  76. {{svg "octicon-repo-forked"}}
  77. {{else if .IsMirror}}
  78. {{svg "octicon-mirror"}}
  79. {{end}}
  80. </td>
  81. <td>{{.NumWatches}}</td>
  82. <td>{{.NumStars}}</td>
  83. <td>{{.NumForks}}</td>
  84. <td>{{.NumIssues}}</td>
  85. <td>{{SizeFmt .Size}}</td>
  86. <td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
  87. <td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.ID}}" data-name="{{.Name}}">{{svg "octicon-trash"}}</a></td>
  88. </tr>
  89. {{end}}
  90. </tbody>
  91. </table>
  92. </div>
  93. {{template "base/paginate" .}}
  94. </div>
  95. </div>
  96. <div class="ui small basic delete modal">
  97. <div class="ui icon header">
  98. {{svg "octicon-trash"}}
  99. {{.i18n.Tr "repo.settings.delete"}}
  100. </div>
  101. <div class="content">
  102. <p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
  103. {{.i18n.Tr "repo.settings.delete_notices_2" `<span class="name"></span>` | Safe}}<br>
  104. {{.i18n.Tr "repo.settings.delete_notices_fork_1"}}<br>
  105. </div>
  106. {{template "base/delete_modal_actions" .}}
  107. </div>
  108. {{template "base/footer" .}}