0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-23 07:21:39 +02:00
Nicolas 26d83c932a
Instance-wide (global) info banner and maintenance mode (#36571)
The banner allows site operators to communicate important announcements
(e.g., maintenance windows, policy updates, service notices) directly
within the UI.

The maintenance mode only allows admin to access the web UI.

* Fix #2345
* Fix #9618

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-26 23:16:11 +08:00

28 lines
1.1 KiB
Handlebars

<h4 class="ui top attached header">
{{ctx.Locale.Tr "repository"}}
</h4>
<div class="ui attached segment">
<form class="ui form system-config-form" method="post" action="{{AppSubUrl}}/-/admin/config">
{{$cfg := .SystemConfig.Repository.OpenWithEditorApps}}
<div class="field">
<details>
<summary>{{ctx.Locale.Tr "admin.config.open_with_editor_app_help"}}</summary>
<pre class="tw-px-4">{{$cfg.DefaultValue.ToTextareaString}}</pre>
</details>
</div>
<div class="field">
{{/* TODO: OPEN-WITH-EDITOR-APP-JSON: use a simple textarea */}}
<textarea name="{{$cfg.DynKey}}">{{if $cfg.HasValue ctx}}{{($cfg.Value ctx).ToTextareaString}}{{end}}</textarea>
</div>
{{$cfg = .SystemConfig.Repository.GitGuideRemoteName}}
<div class="field">
<label>{{ctx.Locale.Tr "admin.config.git_guide_remote_name"}}</label>
<input name="{{$cfg.DynKey}}" value="{{$cfg.Value ctx}}" placeholder="{{$cfg.DefaultValue}}" maxlength="100" dir="auto" required pattern="^[A-Za-z0-9][\-_A-Za-z0-9]*$">
</div>
<div class="field">
<button class="ui primary button">{{ctx.Locale.Tr "save"}}</button>
</div>
</form>
</div>