mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-26 19:56:11 +01:00
703ed272cc
Backport #28631 by @lunny
Since #20805, code can be hidden.
However, the related settings are still shown even though they don't
have any meaning then.
https://github.com/go-gitea/gitea/assets/81045/5fdee54d-ac81-418a-82f7-eadff048cedd
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 5e9fd0ab5e
)
54 lines
2.4 KiB
Go HTML Template
54 lines
2.4 KiB
Go HTML Template
<div class="flex-container-nav">
|
|
<div class="ui fluid vertical menu">
|
|
<div class="header item">{{ctx.Locale.Tr "repo.settings"}}</div>
|
|
<a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.RepoLink}}/settings">
|
|
{{ctx.Locale.Tr "repo.settings.options"}}
|
|
</a>
|
|
<a class="{{if .PageIsSettingsCollaboration}}active {{end}}item" href="{{.RepoLink}}/settings/collaboration">
|
|
{{ctx.Locale.Tr "repo.settings.collaboration"}}
|
|
</a>
|
|
{{if not DisableWebhooks}}
|
|
<a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks">
|
|
{{ctx.Locale.Tr "repo.settings.hooks"}}
|
|
</a>
|
|
{{end}}
|
|
{{if and (.Repository.UnitEnabled $.Context $.UnitTypeCode) (not .Repository.IsEmpty)}}
|
|
<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>
|
|
{{if .SignedUser.CanEditGitHook}}
|
|
<a class="{{if .PageIsSettingsGitHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks/git">
|
|
{{ctx.Locale.Tr "repo.settings.githooks"}}
|
|
</a>
|
|
{{end}}
|
|
<a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{.RepoLink}}/settings/keys">
|
|
{{ctx.Locale.Tr "repo.settings.deploy_keys"}}
|
|
</a>
|
|
{{if .LFSStartServer}}
|
|
<a class="{{if .PageIsSettingsLFS}}active {{end}}item" href="{{.RepoLink}}/settings/lfs">
|
|
{{ctx.Locale.Tr "repo.settings.lfs"}}
|
|
</a>
|
|
{{end}}
|
|
{{end}}
|
|
{{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}}
|
|
<details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}>
|
|
<summary>{{ctx.Locale.Tr "actions.actions"}}</summary>
|
|
<div class="menu">
|
|
<a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{.RepoLink}}/settings/actions/runners">
|
|
{{ctx.Locale.Tr "actions.runners"}}
|
|
</a>
|
|
<a class="{{if .PageIsSharedSettingsSecrets}}active {{end}}item" href="{{.RepoLink}}/settings/actions/secrets">
|
|
{{ctx.Locale.Tr "secrets.secrets"}}
|
|
</a>
|
|
<a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{.RepoLink}}/settings/actions/variables">
|
|
{{ctx.Locale.Tr "actions.variables"}}
|
|
</a>
|
|
</div>
|
|
</details>
|
|
{{end}}
|
|
</div>
|
|
</div>
|