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 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. {{.locale.Tr "admin.packages.package_manage_panel"}} ({{.locale.Tr "admin.total" .TotalCount}},
  8. {{.locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}},
  9. {{.locale.Tr "admin.packages.unreferenced_size" (FileSize .TotalUnreferencedBlobSize)}})
  10. </h4>
  11. <div class="ui attached segment">
  12. <form class="ui form ignore-dirty">
  13. <div class="ui fluid action input">
  14. <input name="q" value="{{.Query}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
  15. <select class="ui dropdown" name="type">
  16. <option value="">{{.locale.Tr "packages.filter.type"}}</option>
  17. <option value="all">{{.locale.Tr "packages.filter.type.all"}}</option>
  18. {{range $type := .AvailableTypes}}
  19. <option{{if eq $.PackageType $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option>
  20. {{end}}
  21. </select>
  22. <button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
  23. </div>
  24. </form>
  25. </div>
  26. <div class="ui attached table segment">
  27. <table class="ui very basic striped table unstackable">
  28. <thead>
  29. <tr>
  30. <th>ID</th>
  31. <th>{{.locale.Tr "admin.packages.owner"}}</th>
  32. <th>{{.locale.Tr "admin.packages.type"}}</th>
  33. <th data-sortt-asc="name_asc" data-sortt-desc="name_desc">
  34. {{.locale.Tr "admin.packages.name"}}
  35. {{SortArrow "name_asc" "name_desc" .SortType false}}
  36. </th>
  37. <th data-sortt-asc="version_desc" data-sortt-desc="version_asc">
  38. {{.locale.Tr "admin.packages.version"}}
  39. {{SortArrow "version_desc" "version_asc" .SortType false}}
  40. </th>
  41. <th>{{.locale.Tr "admin.packages.creator"}}</th>
  42. <th>{{.locale.Tr "admin.packages.repository"}}</th>
  43. <th>{{.locale.Tr "admin.packages.size"}}</th>
  44. <th data-sortt-asc="created_asc" data-sortt-desc="created_desc">
  45. {{.locale.Tr "admin.packages.published"}}
  46. {{SortArrow "created_asc" "created_desc" .SortType true}}
  47. </th>
  48. <th>{{.locale.Tr "admin.notices.op"}}</th>
  49. </tr>
  50. </thead>
  51. <tbody>
  52. {{range .PackageDescriptors}}
  53. <tr>
  54. <td>{{.Version.ID}}</td>
  55. <td>
  56. <a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
  57. {{if .Owner.Visibility.IsPrivate}}
  58. <span class="text gold">{{svg "octicon-lock"}}</span>
  59. {{end}}
  60. </td>
  61. <td>{{.Package.Type.Name}}</td>
  62. <td class="text truncate email">{{.Package.Name}}</td>
  63. <td><a href="{{.FullWebLink}}" class="text truncate email">{{.Version.Version}}</a></td>
  64. <td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td>
  65. <td>
  66. {{if .Repository}}
  67. <a href="{{.Repository.Link}}">{{.Repository.Name}}</a>
  68. {{end}}
  69. </td>
  70. <td>{{FileSize .CalculateBlobSize}}</td>
  71. <td><span title="{{.Version.CreatedUnix.FormatLong}}"><time data-format="short-date" datetime="{{.Version.CreatedUnix.FormatLong}}">{{.Version.CreatedUnix.FormatShort}}</time></span></td>
  72. <td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.Version.ID}}" data-name="{{.Package.Name}}" data-data-version="{{.Version.Version}}">{{svg "octicon-trash"}}</a></td>
  73. </tr>
  74. {{end}}
  75. </tbody>
  76. </table>
  77. </div>
  78. {{template "base/paginate" .}}
  79. </div>
  80. </div>
  81. <div class="ui small basic delete modal">
  82. <div class="ui icon header">
  83. {{svg "octicon-trash"}}
  84. {{.locale.Tr "packages.settings.delete"}}
  85. </div>
  86. <div class="content">
  87. {{.locale.Tr "packages.settings.delete.notice" `<span class="name"></span>` `<span class="dataVersion"></span>` | Safe}}
  88. </div>
  89. {{template "base/delete_modal_actions" .}}
  90. </div>
  91. {{template "base/footer" .}}