|
16 | 16 | <dt>{{ctx.Locale.Tr "admin.config.domain"}}</dt>
|
17 | 17 | <dd>{{.Domain}}</dd>
|
18 | 18 | <dt>{{ctx.Locale.Tr "admin.config.offline_mode"}}</dt>
|
19 |
| - <dd>{{if .OfflineMode}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 19 | + <dd>{{svg (Iif .OfflineMode "octicon-check" "octicon-x")}}</dd> |
20 | 20 | <dt>{{ctx.Locale.Tr "admin.config.disable_router_log"}}</dt>
|
21 |
| - <dd>{{if .DisableRouterLog}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 21 | + <dd>{{svg (Iif .DisableRouterLog "octicon-check" "octicon-x")}}</dd> |
22 | 22 |
|
23 | 23 | <div class="divider"></div>
|
24 | 24 |
|
|
55 | 55 | <div class="ui attached table segment">
|
56 | 56 | <dl class="admin-dl-horizontal">
|
57 | 57 | <dt>{{ctx.Locale.Tr "admin.config.ssh_enabled"}}</dt>
|
58 |
| - <dd>{{if not .SSH.Disabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 58 | + <dd>{{svg (Iif (not .SSH.Disabled) "octicon-check" "octicon-x")}}</dd> |
59 | 59 | {{if not .SSH.Disabled}}
|
60 | 60 | <dt>{{ctx.Locale.Tr "admin.config.ssh_start_builtin_server"}}</dt>
|
61 |
| - <dd>{{if .SSH.StartBuiltinServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 61 | + <dd>{{svg (Iif .SSH.StartBuiltinServer "octicon-check" "octicon-x")}}</dd> |
62 | 62 | <dt>{{ctx.Locale.Tr "admin.config.ssh_domain"}}</dt>
|
63 | 63 | <dd>{{.SSH.Domain}}</dd>
|
64 | 64 | <dt>{{ctx.Locale.Tr "admin.config.ssh_port"}}</dt>
|
|
74 | 74 | <dt>{{ctx.Locale.Tr "admin.config.ssh_keygen_path"}}</dt>
|
75 | 75 | <dd>{{.SSH.KeygenPath}}</dd>
|
76 | 76 | <dt>{{ctx.Locale.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
|
77 |
| - <dd>{{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 77 | + <dd>{{svg (Iif .SSH.MinimumKeySizeCheck "octicon-check" "octicon-x")}}</dd> |
78 | 78 | {{if .SSH.MinimumKeySizeCheck}}
|
79 | 79 | <dt>{{ctx.Locale.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
|
80 | 80 | <dd>{{.SSH.MinimumKeySizes}}</dd>
|
|
90 | 90 | <div class="ui attached table segment">
|
91 | 91 | <dl class="admin-dl-horizontal">
|
92 | 92 | <dt>{{ctx.Locale.Tr "admin.config.lfs_enabled"}}</dt>
|
93 |
| - <dd>{{if .LFS.StartServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 93 | + <dd>{{svg (Iif .LFS.StartServer "octicon-check" "octicon-x")}}</dd> |
94 | 94 | {{if .LFS.StartServer}}
|
95 | 95 | <dt>{{ctx.Locale.Tr "admin.config.lfs_content_path"}}</dt>
|
96 | 96 | <dd>{{JsonUtils.EncodeToString .LFS.Storage.ToShadowCopy}}</dd>
|
|
134 | 134 | <div class="ui attached table segment">
|
135 | 135 | <dl class="admin-dl-horizontal">
|
136 | 136 | <dt>{{ctx.Locale.Tr "admin.config.register_email_confirm"}}</dt>
|
137 |
| - <dd>{{if .Service.RegisterEmailConfirm}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 137 | + <dd>{{svg (Iif .Service.RegisterEmailConfirm "octicon-check" "octicon-x")}}</dd> |
138 | 138 | <dt>{{ctx.Locale.Tr "admin.config.disable_register"}}</dt>
|
139 |
| - <dd>{{if .Service.DisableRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 139 | + <dd>{{svg (Iif .Service.DisableRegistration "octicon-check" "octicon-x")}}</dd> |
140 | 140 | <dt>{{ctx.Locale.Tr "admin.config.allow_only_internal_registration"}}</dt>
|
141 |
| - <dd>{{if .Service.AllowOnlyInternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 141 | + <dd>{{svg (Iif .Service.AllowOnlyInternalRegistration "octicon-check" "octicon-x")}}</dd> |
142 | 142 | <dt>{{ctx.Locale.Tr "admin.config.allow_only_external_registration"}}</dt>
|
143 |
| - <dd>{{if .Service.AllowOnlyExternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 143 | + <dd>{{svg (Iif .Service.AllowOnlyExternalRegistration "octicon-check" "octicon-x")}}</dd> |
144 | 144 | <dt>{{ctx.Locale.Tr "admin.config.show_registration_button"}}</dt>
|
145 |
| - <dd>{{if .Service.ShowRegistrationButton}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 145 | + <dd>{{svg (Iif .Service.ShowRegistrationButton "octicon-check" "octicon-x")}}</dd> |
146 | 146 | <dt>{{ctx.Locale.Tr "admin.config.enable_openid_signup"}}</dt>
|
147 |
| - <dd>{{if .Service.EnableOpenIDSignUp}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 147 | + <dd>{{svg (Iif .Service.EnableOpenIDSignUp "octicon-check" "octicon-x")}}</dd> |
148 | 148 | <dt>{{ctx.Locale.Tr "admin.config.enable_openid_signin"}}</dt>
|
149 |
| - <dd>{{if .Service.EnableOpenIDSignIn}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 149 | + <dd>{{svg (Iif .Service.EnableOpenIDSignIn "octicon-check" "octicon-x")}}</dd> |
150 | 150 | <dt>{{ctx.Locale.Tr "admin.config.require_sign_in_view"}}</dt>
|
151 |
| - <dd>{{if .Service.RequireSignInView}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 151 | + <dd>{{svg (Iif .Service.RequireSignInView "octicon-check" "octicon-x")}}</dd> |
152 | 152 | <dt>{{ctx.Locale.Tr "admin.config.mail_notify"}}</dt>
|
153 |
| - <dd>{{if .Service.EnableNotifyMail}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 153 | + <dd>{{svg (Iif .Service.EnableNotifyMail "octicon-check" "octicon-x")}}</dd> |
154 | 154 | <dt>{{ctx.Locale.Tr "admin.config.enable_captcha"}}</dt>
|
155 |
| - <dd>{{if .Service.EnableCaptcha}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 155 | + <dd>{{svg (Iif .Service.EnableCaptcha "octicon-check" "octicon-x")}}</dd> |
156 | 156 | <dt>{{ctx.Locale.Tr "admin.config.default_keep_email_private"}}</dt>
|
157 |
| - <dd>{{if .Service.DefaultKeepEmailPrivate}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 157 | + <dd>{{svg (Iif .Service.DefaultKeepEmailPrivate "octicon-check" "octicon-x")}}</dd> |
158 | 158 | <dt>{{ctx.Locale.Tr "admin.config.default_allow_create_organization"}}</dt>
|
159 |
| - <dd>{{if .Service.DefaultAllowCreateOrganization}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 159 | + <dd>{{svg (Iif .Service.DefaultAllowCreateOrganization "octicon-check" "octicon-x")}}</dd> |
160 | 160 | <dt>{{ctx.Locale.Tr "admin.config.enable_timetracking"}}</dt>
|
161 |
| - <dd>{{if .Service.EnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 161 | + <dd>{{svg (Iif .Service.EnableTimetracking "octicon-check" "octicon-x")}}</dd> |
162 | 162 | {{if .Service.EnableTimetracking}}
|
163 | 163 | <dt>{{ctx.Locale.Tr "admin.config.default_enable_timetracking"}}</dt>
|
164 |
| - <dd>{{if .Service.DefaultEnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 164 | + <dd>{{svg (Iif .Service.DefaultEnableTimetracking "octicon-check" "octicon-x")}}</dd> |
165 | 165 | <dt>{{ctx.Locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt>
|
166 |
| - <dd>{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 166 | + <dd>{{svg (Iif .Service.DefaultAllowOnlyContributorsToTrackTime "octicon-check" "octicon-x")}}</dd> |
167 | 167 | {{end}}
|
168 | 168 | <dt>{{ctx.Locale.Tr "admin.config.default_visibility_organization"}}</dt>
|
169 | 169 | <dd>{{.Service.DefaultOrgVisibility}}</dd>
|
170 | 170 |
|
171 | 171 | <dt>{{ctx.Locale.Tr "admin.config.no_reply_address"}}</dt>
|
172 | 172 | <dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
|
173 | 173 | <dt>{{ctx.Locale.Tr "admin.config.default_enable_dependencies"}}</dt>
|
174 |
| - <dd>{{if .Service.DefaultEnableDependencies}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 174 | + <dd>{{svg (Iif .Service.DefaultEnableDependencies "octicon-check" "octicon-x")}}</dd> |
175 | 175 | <div class="divider"></div>
|
176 | 176 | <dt>{{ctx.Locale.Tr "admin.config.active_code_lives"}}</dt>
|
177 | 177 | <dd>{{.Service.ActiveCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}</dd>
|
|
190 | 190 | <dt>{{ctx.Locale.Tr "admin.config.deliver_timeout"}}</dt>
|
191 | 191 | <dd>{{.Webhook.DeliverTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
192 | 192 | <dt>{{ctx.Locale.Tr "admin.config.skip_tls_verify"}}</dt>
|
193 |
| - <dd>{{if .Webhook.SkipTLSVerify}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 193 | + <dd>{{svg (Iif .Webhook.SkipTLSVerify "octicon-check" "octicon-x")}}</dd> |
194 | 194 | </dl>
|
195 | 195 | </div>
|
196 | 196 |
|
|
200 | 200 | <div class="ui attached table segment">
|
201 | 201 | <dl class="admin-dl-horizontal">
|
202 | 202 | <dt>{{ctx.Locale.Tr "admin.config.mailer_enabled"}}</dt>
|
203 |
| - <dd>{{if .MailerEnabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 203 | + <dd>{{svg (Iif .MailerEnabled "octicon-check" "octicon-x")}}</dd> |
204 | 204 | {{if .MailerEnabled}}
|
205 | 205 | <dt>{{ctx.Locale.Tr "admin.config.mailer_name"}}</dt>
|
206 | 206 | <dd>{{.Mailer.Name}}</dd>
|
|
220 | 220 | <dt>{{ctx.Locale.Tr "admin.config.mailer_protocol"}}</dt>
|
221 | 221 | <dd>{{.Mailer.Protocol}}</dd>
|
222 | 222 | <dt>{{ctx.Locale.Tr "admin.config.mailer_enable_helo"}}</dt>
|
223 |
| - <dd>{{if .Mailer.EnableHelo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 223 | + <dd>{{svg (Iif .Mailer.EnableHelo "octicon-check" "octicon-x")}}</dd> |
224 | 224 | <dt>{{ctx.Locale.Tr "admin.config.mailer_smtp_addr"}}</dt>
|
225 | 225 | <dd>{{.Mailer.SMTPAddr}}</dd>
|
226 | 226 | <dt>{{ctx.Locale.Tr "admin.config.mailer_smtp_port"}}</dt>
|
|
279 | 279 | <dt>{{ctx.Locale.Tr "admin.config.session_life_time"}}</dt>
|
280 | 280 | <dd>{{.SessionConfig.Maxlifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
281 | 281 | <dt>{{ctx.Locale.Tr "admin.config.https_only"}}</dt>
|
282 |
| - <dd>{{if .SessionConfig.Secure}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 282 | + <dd>{{svg (Iif .SessionConfig.Secure "octicon-check" "octicon-x")}}</dd> |
283 | 283 | </dl>
|
284 | 284 | </div>
|
285 | 285 |
|
|
289 | 289 | <div class="ui attached table segment">
|
290 | 290 | <dl class="admin-dl-horizontal">
|
291 | 291 | <dt>{{ctx.Locale.Tr "admin.config.git_disable_diff_highlight"}}</dt>
|
292 |
| - <dd>{{if .Git.DisableDiffHighlight}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 292 | + <dd>{{svg (Iif .Git.DisableDiffHighlight "octicon-check" "octicon-x")}}</dd> |
293 | 293 | <dt>{{ctx.Locale.Tr "admin.config.git_max_diff_lines"}}</dt>
|
294 | 294 | <dd>{{.Git.MaxGitDiffLines}}</dd>
|
295 | 295 | <dt>{{ctx.Locale.Tr "admin.config.git_max_diff_line_characters"}}</dt>
|
|
321 | 321 | <dl class="admin-dl-horizontal">
|
322 | 322 | {{if .Loggers.xorm.IsEnabled}}
|
323 | 323 | <dt>{{ctx.Locale.Tr "admin.config.xorm_log_sql"}}</dt>
|
324 |
| - <dd>{{if $.LogSQL}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> |
| 324 | + <dd>{{svg (Iif $.LogSQL "octicon-check" "octicon-x")}}</dd> |
325 | 325 | {{end}}
|
326 | 326 |
|
327 | 327 | {{if .Loggers.access.IsEnabled}}
|
|
0 commit comments