1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-27 04:38:36 +00:00

Allow set branch protection in an empty repository (#32095)

This commit is contained in:
Lunny Xiao
2024-09-24 10:06:28 +08:00
committed by GitHub
parent 3f2d8f8730
commit 6eb5950835
3 changed files with 14 additions and 18 deletions

View File

@@ -13,11 +13,9 @@
</a>
{{end}}
{{if .Repository.UnitEnabled $.Context ctx.Consts.RepoUnitTypeCode}}
{{if not .Repository.IsEmpty}}
<a class="{{if .PageIsSettingsBranches}}active {{end}}item" href="{{.RepoLink}}/settings/branches">
{{ctx.Locale.Tr "repo.settings.branches"}}
</a>
{{end}}
<a class="{{if .PageIsSettingsBranches}}active {{end}}item" href="{{.RepoLink}}/settings/branches">
{{ctx.Locale.Tr "repo.settings.branches"}}
</a>
<a class="{{if .PageIsSettingsTags}}active {{end}}item" href="{{.RepoLink}}/settings/tags">
{{ctx.Locale.Tr "repo.settings.tags"}}
</a>