diff options
author | Kerwin Bryant <kerwin612@qq.com> | 2024-06-11 21:07:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 21:07:10 +0800 |
commit | e6ab6e637fb4da2353522d192066869fc2a8a94b (patch) | |
tree | 4d42d59ba55adce8a5e36bac07f0a9da9414f531 /templates/admin/auth/list.tmpl | |
parent | 397930d8c1ffaeefbfec438908b8ddfc75de249a (diff) | |
download | gitea-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.tmpl | 2 |
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> |