|
7 | 7 | <a class="{{if .PageIsSettingsCollaboration}}active {{end}}item" href="{{.RepoLink}}/settings/collaboration">
|
8 | 8 | {{ctx.Locale.Tr "repo.settings.collaboration"}}
|
9 | 9 | </a>
|
10 |
| - {{if not .Repository.IsEmpty}} |
11 |
| - <a class="{{if .PageIsSettingsBranches}}active {{end}}item" href="{{.RepoLink}}/settings/branches"> |
12 |
| - {{ctx.Locale.Tr "repo.settings.branches"}} |
13 |
| - </a> |
14 |
| - {{end}} |
15 |
| - <a class="{{if .PageIsSettingsTags}}active {{end}}item" href="{{.RepoLink}}/settings/tags"> |
16 |
| - {{ctx.Locale.Tr "repo.settings.tags"}} |
17 |
| - </a> |
18 | 10 | {{if not DisableWebhooks}}
|
19 | 11 | <a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks">
|
20 | 12 | {{ctx.Locale.Tr "repo.settings.hooks"}}
|
21 | 13 | </a>
|
22 | 14 | {{end}}
|
23 |
| - {{if .SignedUser.CanEditGitHook}} |
24 |
| - <a class="{{if .PageIsSettingsGitHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks/git"> |
25 |
| - {{ctx.Locale.Tr "repo.settings.githooks"}} |
| 15 | + {{if and (.Repository.UnitEnabled $.Context $.UnitTypeCode) (not .Repository.IsEmpty)}} |
| 16 | + <a class="{{if .PageIsSettingsBranches}}active {{end}}item" href="{{.RepoLink}}/settings/branches"> |
| 17 | + {{ctx.Locale.Tr "repo.settings.branches"}} |
26 | 18 | </a>
|
27 |
| - {{end}} |
28 |
| - <a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{.RepoLink}}/settings/keys"> |
29 |
| - {{ctx.Locale.Tr "repo.settings.deploy_keys"}} |
30 |
| - </a> |
31 |
| - {{if .LFSStartServer}} |
32 |
| - <a class="{{if .PageIsSettingsLFS}}active {{end}}item" href="{{.RepoLink}}/settings/lfs"> |
33 |
| - {{ctx.Locale.Tr "repo.settings.lfs"}} |
| 19 | + <a class="{{if .PageIsSettingsTags}}active {{end}}item" href="{{.RepoLink}}/settings/tags"> |
| 20 | + {{ctx.Locale.Tr "repo.settings.tags"}} |
34 | 21 | </a>
|
| 22 | + {{if .SignedUser.CanEditGitHook}} |
| 23 | + <a class="{{if .PageIsSettingsGitHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks/git"> |
| 24 | + {{ctx.Locale.Tr "repo.settings.githooks"}} |
| 25 | + </a> |
| 26 | + {{end}} |
| 27 | + <a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{.RepoLink}}/settings/keys"> |
| 28 | + {{ctx.Locale.Tr "repo.settings.deploy_keys"}} |
| 29 | + </a> |
| 30 | + {{if .LFSStartServer}} |
| 31 | + <a class="{{if .PageIsSettingsLFS}}active {{end}}item" href="{{.RepoLink}}/settings/lfs"> |
| 32 | + {{ctx.Locale.Tr "repo.settings.lfs"}} |
| 33 | + </a> |
| 34 | + {{end}} |
35 | 35 | {{end}}
|
36 | 36 | {{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}}
|
37 | 37 | <details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}>
|
|
0 commit comments