diff options
author | rock2dust <its@baronbunny.cn> | 2022-10-22 11:24:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-22 11:24:09 +0800 |
commit | cd33979f5a683fd91bd79225e300e41173335926 (patch) | |
tree | 5764da248bb0b3a58bf562592e1ebedd11092ea2 /templates/admin/navbar.tmpl | |
parent | 1887c9525483957cfc2a1af5bccfd7d03b41f015 (diff) | |
download | gitea-cd33979f5a683fd91bd79225e300e41173335926.tar.gz gitea-cd33979f5a683fd91bd79225e300e41173335926.zip |
Added check for disabled Packages (#21540)
At the moment, If admin disable Packages, still show the Packages on the
admin dashboard
This patch added a check to hide the Packages entry
Signed-off-by: baronbunny <its@baronbunny.cn>
Signed-off-by: baronbunny <its@baronbunny.cn>
Diffstat (limited to 'templates/admin/navbar.tmpl')
-rw-r--r-- | templates/admin/navbar.tmpl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl index b138eb79ba..1c8b12fc2f 100644 --- a/templates/admin/navbar.tmpl +++ b/templates/admin/navbar.tmpl @@ -12,9 +12,11 @@ <a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos"> {{.locale.Tr "admin.repositories"}} </a> - <a class="{{if .PageIsAdminPackages}}active{{end}} item" href="{{AppSubUrl}}/admin/packages"> - {{.locale.Tr "packages.title"}} - </a> + {{if .EnablePackages}} + <a class="{{if .PageIsAdminPackages}}active{{end}} item" href="{{AppSubUrl}}/admin/packages"> + {{.locale.Tr "packages.title"}} + </a> + {{end}} {{if not DisableWebhooks}} <a class="{{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/hooks"> {{.locale.Tr "admin.hooks"}} |