diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-06-29 19:01:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 17:01:14 +0000 |
commit | cf2356062fd13c51c9ccc86df96e0ac6cd764f28 (patch) | |
tree | f260bca8c1e4a25ac254134fa2b0674dad7abd18 /templates/package | |
parent | e882398c5acb99db555553acc2da89db73713710 (diff) | |
download | gitea-cf2356062fd13c51c9ccc86df96e0ac6cd764f28.tar.gz gitea-cf2356062fd13c51c9ccc86df96e0ac6cd764f28.zip |
Redirect to package after version deletion (#25594)
Related #25559
Current behaviour:
1. Deletion of a package version
2. Redirect to the owners package list
New behaviour:
1. Deletion of a package version
2.1. If there are more versions available, redirect to the package again
2.2. If there are no versions available, redirect to the owners package
list
Diffstat (limited to 'templates/package')
-rw-r--r-- | templates/package/view.tmpl | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl index 1e7d13285e..6064db1b4c 100644 --- a/templates/package/view.tmpl +++ b/templates/package/view.tmpl @@ -84,19 +84,17 @@ {{end}} </div> {{end}} - {{if .LatestVersions}} - <div class="divider"></div> - <strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong> - <a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a> - <div class="ui relaxed list"> - {{range .LatestVersions}} - <div class="item gt-df"> - <a class="gt-f1" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a> - <span class="text small">{{DateTime "short" .CreatedUnix}}</span> - </div> - {{end}} + <div class="divider"></div> + <strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong> + <a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a> + <div class="ui relaxed list"> + {{range .LatestVersions}} + <div class="item gt-df"> + <a class="gt-f1" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a> + <span class="text small">{{DateTime "short" .CreatedUnix}}</span> </div> {{end}} + </div> {{if or .CanWritePackages .HasRepositoryAccess}} <div class="divider"></div> <div class="ui relaxed list"> |