diff options
author | Norwin <noerw@users.noreply.github.com> | 2022-07-27 13:58:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 19:58:21 +0800 |
commit | 2ae1675092ebe300ed88397a0eae5ca1b3a5443c (patch) | |
tree | 985ab36af394b616ab17cd333ab8d07dcd325fef /templates/package | |
parent | 158f2746b8970c46748604e081bdf1fdd8fa9376 (diff) | |
download | gitea-2ae1675092ebe300ed88397a0eae5ca1b3a5443c.tar.gz gitea-2ae1675092ebe300ed88397a0eae5ca1b3a5443c.zip |
Show hint to link package to repo when viewing empty repo package list (#20504)
* show hint to link package to repo
on empty repo package listing
* reword
Diffstat (limited to 'templates/package')
-rw-r--r-- | templates/package/shared/list.tmpl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index 3b3a1720ea..189b75b59e 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -47,6 +47,10 @@ <div class="empty center"> {{svg "octicon-package" 32}} <h2>{{.locale.Tr "packages.empty"}}</h2> + {{if and .Repository .CanWritePackages}} + {{$packagesUrl := URLJoin .Owner.HTMLURL "-" "packages" }} + <p>{{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}</p> + {{end}} <p>{{.locale.Tr "packages.empty.documentation" | Safe}}</p> </div> {{else}} |