From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/package/shared/list.tmpl | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 templates/package/shared/list.tmpl (limited to 'templates/package/shared/list.tmpl') diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl new file mode 100644 index 0000000..36f8bc1 --- /dev/null +++ b/templates/package/shared/list.tmpl @@ -0,0 +1,57 @@ +{{template "base/alert" .}} +{{if .HasPackages}} +
+
+ {{template "shared/search/input" dict "Value" .Query "Placeholder" (ctx.Locale.Tr "search.package_kind")}} + + {{template "shared/search/button"}} +
+
+{{end}} +
+ {{range .PackageDescriptors}} +
+
+
+
+ {{.Package.Name}} + {{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}} +
+
+ {{$timeStr := TimeSinceUnix .Version.CreatedUnix ctx.Locale}} + {{$hasRepositoryAccess := false}} + {{if .Repository}} + {{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}} + {{end}} + {{if $hasRepositoryAccess}} + {{ctx.Locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink .Creator.GetDisplayName .Repository.Link .Repository.FullName}} + {{else}} + {{ctx.Locale.Tr "packages.published_by" $timeStr .Creator.HomeLink .Creator.GetDisplayName}} + {{end}} +
+
+
+
+ {{else}} + {{if not .HasPackages}} +
+ {{svg "octicon-package" 48}} +

{{ctx.Locale.Tr "packages.empty"}}

+ {{if and .Repository .CanWritePackages}} + {{$packagesUrl := URLJoin .Owner.HomeLink "-" "packages"}} +

{{ctx.Locale.Tr "packages.empty.repo" $packagesUrl}}

+ {{end}} +

{{ctx.Locale.Tr "packages.empty.documentation" "https://forgejo.org/docs/latest/user/packages/"}}

+
+ {{else}} +

{{ctx.Locale.Tr "packages.filter.no_result"}}

+ {{end}} + {{end}} + {{template "base/paginate" .}} +
-- cgit v1.2.3