mirror of https://github.com/gogs/gogs.git
admin: fix template error
Also a try to display key-value pairs in table.pull/4224/head^2
parent
d43f5f17fd
commit
dd649eb4cc
|
@ -1181,7 +1181,8 @@ config.git_pull_timeout = Pull Operation Timeout
|
||||||
config.git_gc_timeout = GC Operation Timeout
|
config.git_gc_timeout = GC Operation Timeout
|
||||||
|
|
||||||
config.log_config = Log Configuration
|
config.log_config = Log Configuration
|
||||||
config.log_mode = Log Mode
|
config.log_mode = Mode
|
||||||
|
config.log_options = Options
|
||||||
|
|
||||||
monitor.cron = Cron Tasks
|
monitor.cron = Cron Tasks
|
||||||
monitor.name = Name
|
monitor.name = Name
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3019,6 +3019,13 @@ footer .ui.language .menu {
|
||||||
.admin.config #test-mail-btn {
|
.admin.config #test-mail-btn {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
.admin.config table tbody tr td:first-child {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.admin.config pre {
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
.explore {
|
.explore {
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
padding-bottom: 80px;
|
padding-bottom: 80px;
|
||||||
|
|
|
@ -62,5 +62,12 @@
|
||||||
#test-mail-btn {
|
#test-mail-btn {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
table tbody tr td:first-child {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,7 +240,7 @@ func Config(ctx *context.Context) {
|
||||||
Mode: strings.Title(setting.LogModes[i]),
|
Mode: strings.Title(setting.LogModes[i]),
|
||||||
}
|
}
|
||||||
|
|
||||||
result, _ := json.Marshal(setting.LogConfigs[i])
|
result, _ := json.MarshalIndent(setting.LogConfigs[i], "", " ")
|
||||||
loggers[i].Config = string(result)
|
loggers[i].Config = string(result)
|
||||||
}
|
}
|
||||||
ctx.Data["Loggers"] = loggers
|
ctx.Data["Loggers"] = loggers
|
||||||
|
|
|
@ -170,7 +170,7 @@
|
||||||
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
||||||
{{if .MailerEnabled}}
|
{{if .MailerEnabled}}
|
||||||
<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
|
||||||
<dd>{{.Mailer.Name}}</dd>
|
<dd>{{.Mailer.Subject}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
|
||||||
|
@ -275,15 +275,19 @@
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.log_config"}}
|
{{.i18n.Tr "admin.config.log_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<table class="ui very basic table">
|
||||||
{{range .Loggers}}
|
{{range .Loggers}}
|
||||||
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
|
<tr>
|
||||||
<dd>{{.Mode}}</dd>
|
<td>{{$.i18n.Tr "admin.config.log_mode"}}</td>
|
||||||
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
|
<td>{{.Mode}}</td>
|
||||||
<dd><pre><code>{{.Config}}</code></pre></dd>
|
<tr>
|
||||||
|
</tr>
|
||||||
|
<td>{{$.i18n.Tr "admin.config.log_options"}}</td>
|
||||||
|
<td><pre><code>{{.Config}}</code></pre></td>
|
||||||
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</dl>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue