{{template "repo/header" .}}
-

- +

{{template "shared/datetime/long" (dict "Datetime" .DateFrom "Fallback" .DateFrom)}} - {{template "shared/datetime/long" (dict "Datetime" .DateUntil "Fallback" .DateUntil)}}
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 023be5cee4..1aaf58ee91 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -93,7 +93,7 @@ {{(MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false).Address}} {{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}} - + {{template "shared/datetime/full" (dict "Datetime" .Mirror.UpdatedUnix.FormatLong "Fallback" .Mirror.UpdatedUnix.AsTime)}}
{{.CsrfTokenHtml}} @@ -171,7 +171,7 @@ {{$address := MirrorRemoteAddress $.Context $.Repository .GetRemoteName true}} {{$address.Address}} {{$.locale.Tr "repo.settings.mirror_settings.direction.push"}} - {{if .LastUpdateUnix}}{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}
{{$.locale.Tr "error"}}
{{end}} + {{if .LastUpdateUnix}}{{template "shared/datetime/full" (dict "Datetime" .LastUpdateUnix.FormatLong "Fallback" .LastUpdateUnix.AsTime)}}{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}
{{$.locale.Tr "error"}}
{{end}} {{$.CsrfTokenHtml}} diff --git a/templates/repo/user_cards.tmpl b/templates/repo/user_cards.tmpl index b7bc3060b2..a48fd41744 100644 --- a/templates/repo/user_cards.tmpl +++ b/templates/repo/user_cards.tmpl @@ -18,7 +18,7 @@ {{else if .Location}} {{svg "octicon-location"}} {{.Location}} {{else}} - {{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} + {{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} {{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}} {{end}}
diff --git a/templates/shared/datetime/full.tmpl b/templates/shared/datetime/full.tmpl new file mode 100644 index 0000000000..1c55a4b53e --- /dev/null +++ b/templates/shared/datetime/full.tmpl @@ -0,0 +1 @@ +{{.Fallback}} diff --git a/templates/shared/datetime/long.tmpl b/templates/shared/datetime/long.tmpl new file mode 100644 index 0000000000..4880cf3f91 --- /dev/null +++ b/templates/shared/datetime/long.tmpl @@ -0,0 +1 @@ +{{.Fallback}} diff --git a/templates/shared/datetime/short.tmpl b/templates/shared/datetime/short.tmpl new file mode 100644 index 0000000000..e5bcef6459 --- /dev/null +++ b/templates/shared/datetime/short.tmpl @@ -0,0 +1 @@ +{{.Fallback}} diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index 35994fc435..198e76f37c 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -106,7 +106,7 @@ {{svg "octicon-calendar" 14 "gt-mr-2"}} - + {{template "shared/datetime/short" (dict "Datetime" .DeadlineUnix.FormatDate "Fallback" .DeadlineUnix.FormatShort)}} {{end}} diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index e0e05575fa..9bde03f001 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -73,7 +73,7 @@ {{end}} {{end}} -
  • {{svg "octicon-clock"}} {{.locale.Tr "user.join_on"}}
  • +
  • {{svg "octicon-clock"}} {{.locale.Tr "user.join_on"}} {{template "shared/datetime/short" (dict "Datetime" .Owner.CreatedUnix.FormatLong "Fallback" .Owner.CreatedUnix.FormatShort)}}
  • {{if and .Orgs .HasOrgsVisible}}
    • diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl index 23cd111229..2694f5cad0 100644 --- a/templates/user/settings/applications.tmpl +++ b/templates/user/settings/applications.tmpl @@ -30,7 +30,7 @@
    - {{$.locale.Tr "settings.add_on"}} — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} {{else}}{{$.locale.Tr "settings.no_activity"}}{{end}} + {{$.locale.Tr "settings.add_on"}} {{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} {{template "shared/datetime/short" (dict "Datetime" .UpdatedUnix.FormatLong "Fallback" .UpdatedUnix.FormatShort)}}{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}