diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-11-02 12:08:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-02 04:08:28 +0000 |
commit | fec6b3d50072e48bb51c18c5c4ea682dc6319573 (patch) | |
tree | a2a90692cb4c91ea10ecc85d39b5c582e2af0b25 /templates/repo/settings | |
parent | 7dcccc3bb19655a6f83dd495ffc332708d0c8678 (diff) | |
download | gitea-fec6b3d50072e48bb51c18c5c4ea682dc6319573.tar.gz gitea-fec6b3d50072e48bb51c18c5c4ea682dc6319573.zip |
Replace DateTime with DateUtils (#32383)
Diffstat (limited to 'templates/repo/settings')
-rw-r--r-- | templates/repo/settings/deploy_keys.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 190ca1af6c..8ab2adb60f 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -55,7 +55,7 @@ {{.Fingerprint}} </div> <div class="flex-item-body"> - <i>{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}} - <span>{{ctx.Locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{ctx.Locale.Tr "settings.can_write_info"}} {{end}}</span></i> + <i>{{ctx.Locale.Tr "settings.added_on" (ctx.DateUtils.AbsoluteShort .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{ctx.DateUtils.AbsoluteShort .UpdatedUnix}}</span>{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}} - <span>{{ctx.Locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{ctx.Locale.Tr "settings.can_write_info"}} {{end}}</span></i> </div> </div> <div class="flex-item-trailing"> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 8f71f0020f..1537a90043 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -117,7 +117,7 @@ <tr> <td>{{.PullMirror.RemoteAddress}}</td> <td>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td> - <td>{{DateTime "full" .PullMirror.UpdatedUnix}}</td> + <td>{{ctx.DateUtils.FullTime .PullMirror.UpdatedUnix}}</td> <td class="right aligned"> <form method="post" class="tw-inline-block"> {{.CsrfTokenHtml}} @@ -205,7 +205,7 @@ <tr> <td class="tw-break-anywhere">{{.RemoteAddress}}</td> <td>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.push"}}</td> - <td>{{if .LastUpdateUnix}}{{DateTime "full" .LastUpdateUnix}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label" data-tooltip-content="{{.LastError}}">{{ctx.Locale.Tr "error"}}</div>{{end}}</td> + <td>{{if .LastUpdateUnix}}{{ctx.DateUtils.FullTime .LastUpdateUnix}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label" data-tooltip-content="{{.LastError}}">{{ctx.Locale.Tr "error"}}</div>{{end}}</td> <td class="right aligned"> <button class="ui tiny button show-modal" |