code optimization (#31315)

Simplifying complex if-else to existing Iif operations
This commit is contained in:
Kerwin Bryant authored and GitHub committed 2024-06-11 21:07:10 +08:00
1 parent 397930d8c1
commit e6ab6e637f
14 files changed
+90 -48

No files matched your search

+1 -1
View File
@@ -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>