From f394cd70ac01fe73346e8dd0b5e3db2ee3ef7e7f Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 23 Apr 2024 17:15:44 +0800 Subject: [PATCH] Show more settings for empty repositories (#29130) (#30635) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #30620 Manullay Backport #29130 Shows more settings for empty repositories (Fixes #29060) Co-authored-by: Tim-Nicas Oelschläger <72873130+zokkis@users.noreply.github.com> --- templates/repo/settings/navbar.tmpl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl index 3bef0fa4c1..0b0ef0b6e8 100644 --- a/templates/repo/settings/navbar.tmpl +++ b/templates/repo/settings/navbar.tmpl @@ -12,10 +12,12 @@ {{ctx.Locale.Tr "repo.settings.hooks"}} {{end}} - {{if and (.Repository.UnitEnabled $.Context $.UnitTypeCode) (not .Repository.IsEmpty)}} - - {{ctx.Locale.Tr "repo.settings.branches"}} - + {{if .Repository.UnitEnabled $.Context $.UnitTypeCode}} + {{if not .Repository.IsEmpty}} + + {{ctx.Locale.Tr "repo.settings.branches"}} + + {{end}} {{ctx.Locale.Tr "repo.settings.tags"}}