forked from forgejo/forgejo
Merge pull request 'Allow users to hide all "Add more units..." hints' (#2533) from algernon/forgejo:less-is-more into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2533 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
0bfd4ca532
15 changed files with 233 additions and 24 deletions
|
@ -172,7 +172,7 @@
|
|||
{{end}}
|
||||
|
||||
{{if .Permission.IsAdmin}}
|
||||
{{if not (.Repository.AllUnitsEnabled ctx)}}
|
||||
{{if and .SignedUser.EnableRepoUnitHints (not (.Repository.AllUnitsEnabled ctx))}}
|
||||
<a class="{{if .PageIsRepoSettingsUnits}}active {{end}}item" href="{{.RepoLink}}/settings/units">
|
||||
{{svg "octicon-diff-added"}} {{ctx.Locale.Tr "repo.settings.units.add_more"}}
|
||||
</a>
|
||||
|
|
8
templates/swagger/v1_json.tmpl
generated
8
templates/swagger/v1_json.tmpl
generated
|
@ -23853,6 +23853,10 @@
|
|||
"type": "string",
|
||||
"x-go-name": "DiffViewStyle"
|
||||
},
|
||||
"enable_repo_unit_hints": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "EnableRepoUnitHints"
|
||||
},
|
||||
"full_name": {
|
||||
"type": "string",
|
||||
"x-go-name": "FullName"
|
||||
|
@ -23897,6 +23901,10 @@
|
|||
"type": "string",
|
||||
"x-go-name": "DiffViewStyle"
|
||||
},
|
||||
"enable_repo_unit_hints": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "EnableRepoUnitHints"
|
||||
},
|
||||
"full_name": {
|
||||
"type": "string",
|
||||
"x-go-name": "FullName"
|
||||
|
|
|
@ -66,6 +66,25 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Hints -->
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "settings.hints"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}/hints" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "settings.additional_repo_units_hint_description"}}">
|
||||
<input name="enable_repo_unit_hints" type="checkbox" {{if $.SignedUser.EnableRepoUnitHints}}checked{{end}}>
|
||||
<label>{{ctx.Locale.Tr "settings.additional_repo_units_hint"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_hints"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Shown comment event types -->
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "settings.hidden_comment_types"}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue