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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <div class="ui container">
  2. {{template "base/alert" .}}
  3. <form class="ui form ignore-dirty">
  4. <div class="ui fluid action input">
  5. <input name="q" value="{{.Query}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
  6. <select class="ui dropdown" name="type">
  7. <option value="">{{.locale.Tr "packages.filter.type"}}</option>
  8. <option value="all">{{.locale.Tr "packages.filter.type.all"}}</option>
  9. <option value="composer" {{if eq .PackageType "composer"}}selected="selected"{{end}}>Composer</option>
  10. <option value="conan" {{if eq .PackageType "conan"}}selected="selected"{{end}}>Conan</option>
  11. <option value="container" {{if eq .PackageType "container"}}selected="selected"{{end}}>Container</option>
  12. <option value="generic" {{if eq .PackageType "generic"}}selected="selected"{{end}}>Generic</option>
  13. <option value="helm" {{if eq .PackageType "helm"}}selected="selected"{{end}}>Helm</option>
  14. <option value="maven" {{if eq .PackageType "maven"}}selected="selected"{{end}}>Maven</option>
  15. <option value="npm" {{if eq .PackageType "npm"}}selected="selected"{{end}}>npm</option>
  16. <option value="nuget" {{if eq .PackageType "nuget"}}selected="selected"{{end}}>NuGet</option>
  17. <option value="pypi" {{if eq .PackageType "pypi"}}selected="selected"{{end}}>PyPi</option>
  18. <option value="rubygems" {{if eq .PackageType "rubygems"}}selected="selected"{{end}}>RubyGems</option>
  19. </select>
  20. <button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
  21. </div>
  22. </form>
  23. <div class="ui {{if .PackageDescriptors}}issue list{{end}}">
  24. {{range .PackageDescriptors}}
  25. <li class="item df py-3">
  26. <div class="issue-item-main f1 fc df">
  27. <div class="issue-item-top-row">
  28. <a class="title" href="{{.FullWebLink}}">{{.Package.Name}}</a>
  29. <span class="ui label">{{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}</span>
  30. </div>
  31. <div class="desc issue-item-bottom-row df ac fw my-1">
  32. {{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}}
  33. {{$hasRepositoryAccess := false}}
  34. {{if .Repository}}
  35. {{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}}
  36. {{end}}
  37. {{if $hasRepositoryAccess}}
  38. {{$.locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) .Repository.HTMLURL (.Repository.FullName | Escape) | Safe}}
  39. {{else}}
  40. {{$.locale.Tr "packages.published_by" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
  41. {{end}}
  42. </div>
  43. </div>
  44. </li>
  45. {{else}}
  46. {{if not .HasPackages}}
  47. <div class="empty center">
  48. {{svg "octicon-package" 32}}
  49. <h2>{{.locale.Tr "packages.empty"}}</h2>
  50. {{if and .Repository .CanWritePackages}}
  51. {{$packagesUrl := URLJoin .Owner.HTMLURL "-" "packages" }}
  52. <p>{{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}</p>
  53. {{end}}
  54. <p>{{.locale.Tr "packages.empty.documentation" | Safe}}</p>
  55. </div>
  56. {{else}}
  57. <p>{{.locale.Tr "packages.filter.no_result"}}</p>
  58. {{end}}
  59. {{end}}
  60. {{template "base/paginate" .}}
  61. </div>
  62. </div>