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/cron.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/cron.tmpl')
-rw-r--r-- | templates/admin/cron.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/admin/cron.tmpl b/templates/admin/cron.tmpl index 3cb641488c..bb412ef146 100644 --- a/templates/admin/cron.tmpl +++ b/templates/admin/cron.tmpl @@ -26,7 +26,7 @@ <td>{{DateTime "full" .Next}}</td> <td>{{if gt .Prev.Year 1}}{{DateTime "full" .Prev}}{{else}}-{{end}}</td> <td>{{.ExecTimes}}</td> - <td {{if ne .Status ""}}data-tooltip-content="{{.FormatLastMessage ctx.Locale}}"{{end}} >{{if eq .Status ""}}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}}</td> + <td {{if ne .Status ""}}data-tooltip-content="{{.FormatLastMessage ctx.Locale}}"{{end}} >{{if eq .Status ""}}—{{else}}{{svg (Iif (eq .Status "finished") "octicon-check" "octicon-x") 16}}{{end}}</td> </tr> {{end}} </tbody> |