1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00

Fix incorrect package link method calls in templates (#29580)

Fix #29562
Follow  #29531

(cherry picked from commit 7ec4c65ea5d5a3765d24ee68ae421f2f911b6b5d)
This commit is contained in:
wxiaoguang 2024-03-04 18:57:30 +08:00 committed by Earl Warren
parent bb09ad2b63
commit 3c05986fcf
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 5 additions and 5 deletions

View 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}}

View file

@ -10,7 +10,7 @@
{{template "user/overview/header" .}}
{{end}}
{{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>

View 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>

View 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">

View 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}}
</div>