{{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 023be5cee4216..1aaf58ee91ca5 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 b7bc3060b21fd..a48fd41744c8e 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 0000000000000..1c55a4b53ee25 --- /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 0000000000000..4880cf3f91880 --- /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 0000000000000..e5bcef6459342 --- /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 35994fc4354b9..198e76f37cbbe 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 e0e05575fa03b..9bde03f00171e 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 23cd111229401..2694f5cad0d40 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}}