]> source.dussan.org Git - gitea.git/commitdiff
Fix incorrect package link method calls in templates (#29580) (#29764)
authorwxiaoguang <wxiaoguang@gmail.com>
Wed, 13 Mar 2024 11:43:31 +0000 (19:43 +0800)
committerGitHub <noreply@github.com>
Wed, 13 Mar 2024 11:43:31 +0000 (19:43 +0800)
Backport #29580
Fix #29562
Fix #29762
Follow  #29531

templates/admin/packages/list.tmpl
templates/package/settings.tmpl
templates/package/shared/cleanup_rules/preview.tmpl
templates/package/shared/list.tmpl
templates/package/shared/versionlist.tmpl

index c67797d6b0cca7363aec3d5c1c63975e15957b69..9271182fdce3bc621dee3da360067ba34d67bb86 100644 (file)
@@ -63,7 +63,7 @@
                                                        </td>
                                                        <td>{{.Package.Type.Name}}</td>
                                                        <td class="gt-ellipsis gt-max-width-12rem">{{.Package.Name}}</td>
-                                                       <td class="gt-ellipsis gt-max-width-12rem"><a href="{{.FullWebLink}}">{{.Version.Version}}</a></td>
+                                                       <td class="gt-ellipsis gt-max-width-12rem"><a href="{{.VersionWebLink}}">{{.Version.Version}}</a></td>
                                                        <td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td>
                                                        <td>
                                                        {{if .Repository}}
index 6ef62753e2372c1aea8b1d8f3086c96e7368efef..b5017bcfc4cde1e8af6a6907cc2f0ca21c4ce6d2 100644 (file)
@@ -4,7 +4,7 @@
        <div class="ui container">
                {{template "user/overview/header" .}}
                {{template "base/alert" .}}
-               <p><a href="{{.PackageDescriptor.FullWebLink}}">{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</a> / <strong>{{ctx.Locale.Tr "repo.settings"}}</strong></p>
+               <p><a href="{{.PackageDescriptor.VersionWebLink}}">{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</a> / <strong>{{ctx.Locale.Tr "repo.settings"}}</strong></p>
                <h4 class="ui top attached header">
                        {{ctx.Locale.Tr "packages.settings.link"}}
                </h4>
index 7a50d5ccca2e8348457c3458c520bc86e7aab7c1..cff8e8249f46fe749bd0ebf62ee9a3d9a820b793 100644 (file)
@@ -19,7 +19,7 @@
                                <tr>
                                        <td>{{.Package.Type.Name}}</td>
                                        <td>{{.Package.Name}}</td>
-                                       <td><a href="{{.FullWebLink}}">{{.Version.Version}}</a></td>
+                                       <td><a href="{{.VersionWebLink}}">{{.Version.Version}}</a></td>
                                        <td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td>
                                        <td>{{FileSize .CalculateBlobSize}}</td>
                                        <td>{{DateTime "short" .Version.CreatedUnix}}</td>
index bd796d221c83d19420897d70fac6e177028e2227..79870f5ccbd9c2a5b0721b290a6fd1d58de2aad9 100644 (file)
@@ -20,7 +20,7 @@
                <div class="flex-item">
                        <div class="flex-item-main">
                                <div class="flex-item-title">
-                                       <a href="{{.FullWebLink}}">{{.Package.Name}}</a>
+                                       <a href="{{.VersionWebLink}}">{{.Package.Name}}</a>
                                        <span class="ui label">{{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}</span>
                                </div>
                                <div class="flex-item-body">
index 71a1557ffba4b58e09e1e07b04a916b62504f12e..ee664cc48d4e608a3231b838ffef1a2fb5ee2387 100644 (file)
@@ -23,7 +23,7 @@
        <div class="flex-list">
                <div class="flex-item">
                        <div class="flex-item-main">
-                               <a class="flex-item-title" href="{{.FullWebLink}}">{{.Version.LowerVersion}}</a>
+                               <a class="flex-item-title" href="{{.VersionWebLink}}">{{.Version.LowerVersion}}</a>
                                <div class="flex-item-body">
                                        {{ctx.Locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix ctx.Locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
                                </div>