diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index 1acafff41a..b2f339285f 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -1,53 +1,53 @@ - {{template "base/alert" .}} -
-
- {{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}} - - -
-
-
- {{range .PackageDescriptors}} -
  • -
    -
    - {{.Package.Name}} - {{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}} -
    -
    - {{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}} - {{$hasRepositoryAccess := false}} - {{if .Repository}} - {{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}} - {{end}} - {{if $hasRepositoryAccess}} - {{$.locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) .Repository.Link (.Repository.FullName | Escape) | Safe}} - {{else}} - {{$.locale.Tr "packages.published_by" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} - {{end}} -
    -
    -
  • - {{else}} - {{if not .HasPackages}} -
    - {{svg "octicon-package" 48}} -

    {{.locale.Tr "packages.empty"}}

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

    {{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}

    - {{end}} -

    {{.locale.Tr "packages.empty.documentation" "https://docs.gitea.io/en-us/usage/packages/overview/" | Safe}}

    -
    - {{else}} -

    {{.locale.Tr "packages.filter.no_result"}}

    +{{template "base/alert" .}} +
    +
    + {{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}} + +
    +
    +
    + {{range .PackageDescriptors}} +
  • +
    +
    + {{.Package.Name}} + {{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}} +
    +
    + {{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}} + {{$hasRepositoryAccess := false}} + {{if .Repository}} + {{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}} + {{end}} + {{if $hasRepositoryAccess}} + {{$.locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) .Repository.Link (.Repository.FullName | Escape) | Safe}} + {{else}} + {{$.locale.Tr "packages.published_by" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} + {{end}} +
    +
    +
  • + {{else}} + {{if not .HasPackages}} +
    + {{svg "octicon-package" 48}} +

    {{.locale.Tr "packages.empty"}}

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

    {{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}

    + {{end}} +

    {{.locale.Tr "packages.empty.documentation" "https://docs.gitea.io/en-us/usage/packages/overview/" | Safe}}

    +
    + {{else}} +

    {{.locale.Tr "packages.filter.no_result"}}

    + {{end}} + {{end}} + {{template "base/paginate" .}} +
    diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl index be5c2a16de..afd92efff9 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -1,37 +1,37 @@ -

    {{.PackageDescriptor.Package.Name}} / {{.locale.Tr "packages.versions"}}

    -
    -
    - {{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}} - - {{if eq .PackageDescriptor.Package.Type "container"}} - - {{end}} - -
    -
    -
    - {{range .PackageDescriptors}} -
  • -
    - -
    - {{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} -
    -
    -
  • - {{else}} -

    {{.locale.Tr "packages.filter.no_result"}}

    +

    {{.PackageDescriptor.Package.Name}} / {{.locale.Tr "packages.versions"}}

    +
    +
    + {{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}} + + {{if eq .PackageDescriptor.Package.Type "container"}} + {{end}} - {{template "base/paginate" .}} +
    +
    +
    + {{range .PackageDescriptors}} +
  • +
    + +
    + {{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} +
    +
    +
  • + {{else}} +

    {{.locale.Tr "packages.filter.no_result"}}

    + {{end}} + {{template "base/paginate" .}} +
    diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl index ebce0ea48f..79e18678d4 100644 --- a/templates/projects/list.tmpl +++ b/templates/projects/list.tmpl @@ -1,76 +1,76 @@ - {{if .CanWriteProjects}} - -
    - {{end}} +{{if .CanWriteProjects}} + +
    +{{end}} - {{template "base/alert" .}} -