Browse Source

admin: fix template error

Also a try to display key-value pairs in table.
pull/4240/head
Unknwon 8 years ago
parent
commit
dd649eb4cc
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 3
      conf/locale/locale_en-US.ini
  2. 50
      modules/bindata/bindata.go
  3. 7
      public/css/gogs.css
  4. 7
      public/less/_admin.less
  5. 2
      routers/admin/admin.go
  6. 20
      templates/admin/config.tmpl

3
conf/locale/locale_en-US.ini

@ -1181,7 +1181,8 @@ config.git_pull_timeout = Pull Operation Timeout
config.git_gc_timeout = GC Operation Timeout
config.log_config = Log Configuration
config.log_mode = Log Mode
config.log_mode = Mode
config.log_options = Options
monitor.cron = Cron Tasks
monitor.name = Name

50
modules/bindata/bindata.go

File diff suppressed because one or more lines are too long

7
public/css/gogs.css

@ -3019,6 +3019,13 @@ footer .ui.language .menu {
.admin.config #test-mail-btn {
margin-left: 5px;
}
.admin.config table tbody tr td:first-child {
font-weight: bold;
}
.admin.config pre {
background-color: #f7f7f7;
padding: 5px;
}
.explore {
padding-top: 15px;
padding-bottom: 80px;

7
public/less/_admin.less

@ -62,5 +62,12 @@
#test-mail-btn {
margin-left: 5px;
}
table tbody tr td:first-child {
font-weight: bold;
}
pre {
background-color: #f7f7f7;
padding: 5px;
}
}
}

2
routers/admin/admin.go

@ -240,7 +240,7 @@ func Config(ctx *context.Context) {
Mode: strings.Title(setting.LogModes[i]),
}
result, _ := json.Marshal(setting.LogConfigs[i])
result, _ := json.MarshalIndent(setting.LogConfigs[i], "", " ")
loggers[i].Config = string(result)
}
ctx.Data["Loggers"] = loggers

20
templates/admin/config.tmpl

@ -170,7 +170,7 @@
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
{{if .MailerEnabled}}
<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>
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
@ -275,15 +275,19 @@
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.log_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<div class="ui attached segment">
<table class="ui very basic table">
{{range .Loggers}}
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
<dd>{{.Mode}}</dd>
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
<dd><pre><code>{{.Config}}</code></pre></dd>
<tr>
<td>{{$.i18n.Tr "admin.config.log_mode"}}</td>
<td>{{.Mode}}</td>
<tr>
</tr>
<td>{{$.i18n.Tr "admin.config.log_options"}}</td>
<td><pre><code>{{.Config}}</code></pre></td>
</tr>
{{end}}
</dl>
</table>
</div>
</div>
</div>

Loading…
Cancel
Save