aboutsummaryrefslogtreecommitdiffstats
path: root/templates/admin/auth/list.tmpl
diff options
context:
space:
mode:
authorKerwin Bryant <kerwin612@qq.com>2024-06-11 21:07:10 +0800
committerGitHub <noreply@github.com>2024-06-11 21:07:10 +0800
commite6ab6e637fb4da2353522d192066869fc2a8a94b (patch)
tree4d42d59ba55adce8a5e36bac07f0a9da9414f531 /templates/admin/auth/list.tmpl
parent397930d8c1ffaeefbfec438908b8ddfc75de249a (diff)
downloadgitea-e6ab6e637fb4da2353522d192066869fc2a8a94b.tar.gz
gitea-e6ab6e637fb4da2353522d192066869fc2a8a94b.zip
code optimization (#31315)
Simplifying complex if-else to existing Iif operations
Diffstat (limited to 'templates/admin/auth/list.tmpl')
-rw-r--r--templates/admin/auth/list.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl
index 6483ec800c..174dda1e2a 100644
--- a/templates/admin/auth/list.tmpl
+++ b/templates/admin/auth/list.tmpl
@@ -25,7 +25,7 @@
<td>{{.ID}}</td>
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
<td>{{.TypeName}}</td>
- <td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
+ <td>{{svg (Iif .IsActive "octicon-check" "octicon-x")}}</td>
<td>{{DateTime "short" .UpdatedUnix}}</td>
<td>{{DateTime "short" .CreatedUnix}}</td>
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{svg "octicon-pencil"}}</a></td>