diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-05-07 18:21:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-07 18:21:15 +0200 |
commit | 8adba93498ccdde7edcb54e10f6a3d176c3815c4 (patch) | |
tree | e48b5809a0a76ca8c2087d373d00a225b713ebb3 /templates/package/view.tmpl | |
parent | 38d72d40f132df8a6e90063f3e96a80048bf299e (diff) | |
download | gitea-8adba93498ccdde7edcb54e10f6a3d176c3815c4.tar.gz gitea-8adba93498ccdde7edcb54e10f6a3d176c3815c4.zip |
Hide private repositories in packages (#19584)
Diffstat (limited to 'templates/package/view.tmpl')
-rw-r--r-- | templates/package/view.tmpl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl index bb96da3410..efad9f9b8f 100644 --- a/templates/package/view.tmpl +++ b/templates/package/view.tmpl @@ -10,7 +10,7 @@ </div> <div> {{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.i18n.Lang}} - {{if .PackageDescriptor.Repository}} + {{if .HasRepositoryAccess}} {{.i18n.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.HTMLURL (.PackageDescriptor.Repository.FullName | Escape) | Safe}} {{else}} {{.i18n.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}} @@ -35,7 +35,7 @@ <strong>{{.i18n.Tr "packages.details"}}</strong> <div class="ui relaxed list"> <div class="item">{{svg .PackageDescriptor.Package.Type.SVGName 16 "mr-3"}} {{.PackageDescriptor.Package.Type.Name}}</div> - {{if .PackageDescriptor.Repository}} + {{if .HasRepositoryAccess}} <div class="item">{{svg "octicon-repo" 16 "mr-3"}} <a href="{{.PackageDescriptor.Repository.HTMLURL}}">{{.PackageDescriptor.Repository.FullName}}</a></div> {{end}} <div class="item">{{svg "octicon-calendar" 16 "mr-3"}} {{.PackageDescriptor.Version.CreatedUnix.FormatDate}}</div> @@ -76,10 +76,10 @@ {{end}} </div> {{end}} - {{if or .CanWritePackages .PackageDescriptor.Repository}} + {{if or .CanWritePackages .HasRepositoryAccess}} <div class="ui divider"></div> <div class="ui relaxed list"> - {{if .PackageDescriptor.Repository}} + {{if .HasRepositoryAccess}} <div class="item">{{svg "octicon-issue-opened" 16 "mr-3"}} <a href="{{.PackageDescriptor.Repository.HTMLURL}}/issues">{{.i18n.Tr "repo.issues"}}</a></div> {{end}} {{if .CanWritePackages}} |