diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-04-26 03:48:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 15:48:30 -0400 |
commit | 0e8045d8ea51b1bf856cfd9c57cabd8187a3a2ab (patch) | |
tree | 90294cc32a89f4354ed3ad76d328dd2973b50fbf /templates/admin/user | |
parent | 9219534447411f6ffe507fee64f89c619c29d501 (diff) | |
download | gitea-0e8045d8ea51b1bf856cfd9c57cabd8187a3a2ab.tar.gz gitea-0e8045d8ea51b1bf856cfd9c57cabd8187a3a2ab.zip |
Fix template function DateTime (#24317)
Before, 500 error
![image](https://user-images.githubusercontent.com/2114189/234170176-403ffd1b-ec27-42be-bff9-86184dc8d74d.png)
Diffstat (limited to 'templates/admin/user')
-rw-r--r-- | templates/admin/user/list.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index fef7c7b27f..2f76f2d3ba 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -91,9 +91,9 @@ <td>{{if .IsRestricted}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td> <td>{{if index $.UsersTwoFaStatus .ID}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td> <td>{{.NumRepos}}</td> - <td>{{DateTime "short" .CreatedUnix.FormatLong .CreatedUnix.FormatShort}}</td> + <td>{{DateTime "short" .CreatedUnix}}</td> {{if .LastLoginUnix}} - <td>{{DateTime "short" .LastLoginUnix.FormatLong .LastLoginUnix.FormatShort}}</td> + <td>{{DateTime "short" .LastLoginUnix}}</td> {{else}} <td><span>{{$.locale.Tr "admin.users.never_login"}}</span></td> {{end}} |