Show hint to link package to repo when viewing empty repo package list (#20504) (#20507)

This commit is contained in:
Norwin 2022-07-27 16:06:54 +02:00 committed by GitHub
parent e0f35ea00f
commit 0a32bd56eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -47,6 +47,10 @@
<div class="empty center">
{{svg "octicon-package" 32}}
<h2>{{.i18n.Tr "packages.empty"}}</h2>
{{if and .Repository .CanWritePackages}}
{{$packagesUrl := URLJoin .Owner.HTMLURL "-" "packages" }}
<p>{{.i18n.Tr "packages.empty.repo" $packagesUrl | Safe}}</p>
{{end}}
<p>{{.i18n.Tr "packages.empty.documentation" | Safe}}</p>
</div>
{{else}}