forked from forgejo/forgejo
Add a direct link from repo header to unit settings
If a repository administrator is viewing a repository, and there are units that can be enabled, display an "Add more..." link that leads to the repository unit settings page. The goal here is to allow instances to configure a small set of repo units to be enabled by default, but also highlight for repo admins that they can add more. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
parent
fa73375e13
commit
e07b0e75ff
4 changed files with 75 additions and 0 deletions
|
@ -219,6 +219,11 @@
|
|||
{{end}}
|
||||
|
||||
{{if .Permission.IsAdmin}}
|
||||
{{if not .AllUnitsEnabled}}
|
||||
<a class="{{if .PageIsRepoSettingsUnits}}active {{end}}item" href="{{.RepoLink}}/settings/units">
|
||||
{{svg "octicon-diff-added"}} {{ctx.Locale.Tr "repo.settings.units.add_more"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="{{if .PageIsRepoSettings}}active {{end}} item" href="{{.RepoLink}}/settings">
|
||||
{{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue