|
9 | 9 | {{if .User.IsAdmin}}
|
10 | 10 | <span class="ui basic label">{{ctx.Locale.Tr "admin.users.admin"}}</span>
|
11 | 11 | {{end}}
|
| 12 | + {{if .User.IsTypeBot}} |
| 13 | + <span class="ui basic label">{{ctx.Locale.Tr "admin.users.bot"}}</span> |
| 14 | + {{end}} |
12 | 15 | </div>
|
13 | 16 | <div class="flex-item-body">
|
14 | 17 | <b>{{ctx.Locale.Tr "admin.users.auth_source"}}:</b>
|
15 |
| - {{if eq .LoginSource.ID 0}} |
16 |
| - {{ctx.Locale.Tr "admin.users.local"}} |
17 |
| - {{else}} |
18 |
| - {{.LoginSource.Name}} |
19 |
| - {{end}} |
| 18 | + {{Iif (eq .LoginSource.ID 0) (ctx.Locale.Tr "admin.users.local") .LoginSource.Name}} |
20 | 19 | </div>
|
21 | 20 | <div class="flex-item-body">
|
22 | 21 | <b>{{ctx.Locale.Tr "admin.users.activated"}}:</b>
|
23 |
| - {{if .User.IsActive}} |
24 |
| - {{svg "octicon-check"}} |
25 |
| - {{else}} |
26 |
| - {{svg "octicon-x"}} |
27 |
| - {{end}} |
| 22 | + {{svg (Iif .User.IsActive "octicon-check" "octicon-x")}} |
| 23 | + </div> |
| 24 | + <div class="flex-item-body"> |
| 25 | + <b>{{ctx.Locale.Tr "admin.users.prohibit_login"}}:</b> |
| 26 | + {{svg (Iif .User.ProhibitLogin "octicon-check" "octicon-x")}} |
28 | 27 | </div>
|
29 | 28 | <div class="flex-item-body">
|
30 | 29 | <b>{{ctx.Locale.Tr "admin.users.restricted"}}:</b>
|
31 |
| - {{if .User.IsRestricted}} |
32 |
| - {{svg "octicon-check"}} |
33 |
| - {{else}} |
34 |
| - {{svg "octicon-x"}} |
35 |
| - {{end}} |
| 30 | + {{svg (Iif .User.IsRestricted "octicon-check" "octicon-x")}} |
36 | 31 | </div>
|
37 | 32 | <div class="flex-item-body">
|
38 | 33 | <b>{{ctx.Locale.Tr "settings.visibility"}}:</b>
|
|
42 | 37 | </div>
|
43 | 38 | <div class="flex-item-body">
|
44 | 39 | <b>{{ctx.Locale.Tr "admin.users.2fa"}}:</b>
|
45 |
| - {{if .TwoFactorEnabled}} |
46 |
| - <span class="text green">{{svg "octicon-check"}}</span> |
47 |
| - {{else}} |
48 |
| - {{svg "octicon-x"}} |
49 |
| - {{end}} |
| 40 | + {{svg (Iif .TwoFactorEnabled "octicon-check" "octicon-x")}} |
50 | 41 | </div>
|
51 | 42 | {{if .User.Language}}
|
52 | 43 | <div class="flex-item-body">
|
|
0 commit comments