Skip to content

Commit baee7bd

Browse files
committed
Use shared templates
1 parent 506d1b3 commit baee7bd

24 files changed

+28
-25
lines changed

templates/admin/auth/list.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
3030
<td>{{.TypeName}}</td>
3131
<td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
32-
<td><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.UpdatedUnix.FormatLong}}">{{.UpdatedUnix.FormatShort}}</relative-time></td>
33-
<td><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time></td>
32+
<td>{{template "shared/datetime/short" (dict "Datetime" .UpdatedUnix.FormatLong "Fallback" .UpdatedUnix.FormatShort)}}</td>
33+
<td>{{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}</td>
3434
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{svg "octicon-pencil"}}</a></td>
3535
</tr>
3636
{{end}}

templates/admin/notice.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<td>{{.ID}}</td>
3030
<td>{{$.locale.Tr .TrStr}}</td>
3131
<td class="view-detail"><span class="notice-description text truncate">{{.Description}}</span></td>
32-
<td><span class="notice-created-time"><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time></span></td>
32+
<td><span class="notice-created-time">{{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}</span></td>
3333
<td><a href="#">{{svg "octicon-note" 16 "view-detail"}}</a></td>
3434
</tr>
3535
{{end}}

templates/admin/org/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<td>{{.NumTeams}}</td>
4545
<td>{{.NumMembers}}</td>
4646
<td>{{.NumRepos}}</td>
47-
<td><span title="{{.CreatedUnix.FormatLong}}"><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time></span></td>
47+
<td><span title="{{.CreatedUnix.FormatLong}}">{{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}</span></td>
4848
<td><a href="{{.OrganisationLink}}/settings">{{svg "octicon-pencil"}}</a></td>
4949
</tr>
5050
{{end}}

templates/admin/packages/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
{{end}}
6969
</td>
7070
<td>{{FileSize .CalculateBlobSize}}</td>
71-
<td><span title="{{.Version.CreatedUnix.FormatLong}}"><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.Version.CreatedUnix.FormatLong}}">{{.Version.CreatedUnix.FormatShort}}</relative-time></span></td>
71+
<td><span title="{{.Version.CreatedUnix.FormatLong}}">{{template "shared/datetime/short" (dict "Datetime" .Version.CreatedUnix.FormatLong "Fallback" .Version.CreatedUnix.FormatShort)}}</span></td>
7272
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.Version.ID}}" data-name="{{.Package.Name}}" data-data-version="{{.Version.Version}}">{{svg "octicon-trash"}}</a></td>
7373
</tr>
7474
{{end}}

templates/admin/repo/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<td>{{.NumForks}}</td>
8484
<td>{{.NumIssues}}</td>
8585
<td>{{FileSize .Size}}</td>
86-
<td><span title="{{.CreatedUnix.FormatLong}}"><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time></span></td>
86+
<td><span title="{{.CreatedUnix.FormatLong}}">{{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}</span></td>
8787
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.ID}}" data-name="{{.Name}}">{{svg "octicon-trash"}}</a></td>
8888
</tr>
8989
{{end}}

templates/admin/user/list.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@
9494
<td>{{if .IsRestricted}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
9595
<td>{{if index $.UsersTwoFaStatus .ID}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
9696
<td>{{.NumRepos}}</td>
97-
<td><span title="{{.CreatedUnix.FormatLong}}"><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time></span></td>
97+
<td><span title="{{.CreatedUnix.FormatLong}}">{{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}</span></td>
9898
{{if .LastLoginUnix}}
99-
<td><span title="{{.LastLoginUnix.FormatLong}}"><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.LastLoginUnix.FormatLong}}">{{.LastLoginUnix.FormatShort}}</relative-time></span></td>
99+
<td><span title="{{.LastLoginUnix.FormatLong}}">{{template "shared/datetime/short" (dict "Datetime" .LastLoginUnix.FormatLong "Fallback" .LastLoginUnix.FormatShort)}}</span></td>
100100
{{else}}
101101
<td><span>{{$.locale.Tr "admin.users.never_login"}}</span></td>
102102
{{end}}

templates/explore/organizations.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{{svg "octicon-link"}}
2424
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
2525
{{end}}
26-
{{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} <relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time>
26+
{{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} {{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}
2727
</div>
2828
</div>
2929
</div>

templates/explore/users.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{svg "octicon-mail"}}
1919
<a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
2020
{{end}}
21-
{{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} <relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time>
21+
{{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} {{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}
2222
</div>
2323
</div>
2424
</div>

templates/package/shared/cleanup_rules/preview.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<td><a href="{{.FullWebLink}}">{{.Version.Version}}</a></td>
2323
<td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td>
2424
<td>{{FileSize .CalculateBlobSize}}</td>
25-
<td><span title="{{.Version.CreatedUnix.FormatLong}}"><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.Version.CreatedUnix.FormatLong}}">{{.Version.CreatedUnix.FormatShort}}</relative-time></span></td>
25+
<td><span title="{{.Version.CreatedUnix.FormatLong}}">{{template "shared/datetime/short" (dict "Datetime" .Version.CreatedUnix.FormatLong "Fallback" .Version.CreatedUnix.FormatShort)}}</span></td>
2626
</tr>
2727
{{else}}
2828
<tr>

templates/repo/activity.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div role="main" aria-label="{{.Title}}" class="page-content repository commits">
33
{{template "repo/header" .}}
44
<div class="ui container">
5-
<h2 class="ui header"><relative-time format="datetime" year="numeric" month="long" day="numeric" weekday="" datetime="{{.DateFrom}}">{{.DateFrom}}</relative-time> - <relative-time format="datetime" year="numeric" month="long" day="numeric" weekday="" datetime="{{.DateUntil}}">{{.DateUntil}}</relative-time>
5+
<h2 class="ui header">{{template "shared/datetime/long" (dict "Datetime" .DateFrom "Fallback" .DateFrom)}} - {{template "shared/datetime/long" (dict "Datetime" .DateUntil "Fallback" .DateUntil)}}
66
<div class="ui right">
77
<!-- Period -->
88
<div class="ui floating dropdown jump filter">

templates/repo/issue/view_content/sidebar.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@
385385
<div class="gt-df gt-sb gt-ac">
386386
<div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{.locale.Tr "repo.issues.due_date_overdue"}}"{{end}}>
387387
{{svg "octicon-calendar" 16 "gt-mr-3"}}
388-
<relative-time format="datetime" year="numeric" month="long" day="numeric" weekday="" datetime="{{.Issue.DeadlineUnix.FormatDate}}">{{.Issue.DeadlineUnix.FormatDate}}</relative-time>
388+
{{template "shared/datetime/long" (dict "Datetime" .Issue.DeadlineUnix.FormatDate "Fallback" .Issue.DeadlineUnix.FormatDate)}}
389389
</div>
390390
<div>
391391
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}

templates/repo/settings/deploy_keys.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
{{.Fingerprint}}
6565
</div>
6666
<div class="activity meta">
67-
<i>{{$.locale.Tr "settings.add_on"}} <span><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time></span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.UpdatedUnix.FormatLong}}">{{.UpdatedUnix.FormatShort}}</relative-time></span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}} - <span>{{$.locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.locale.Tr "settings.can_write_info"}} {{end}}</span></i>
67+
<i>{{$.locale.Tr "settings.add_on"}} <span>{{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{template "shared/datetime/short" (dict "Datetime" .UpdatedUnix.FormatLong "Fallback" .UpdatedUnix.FormatShort)}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}} - <span>{{$.locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.locale.Tr "settings.can_write_info"}} {{end}}</span></i>
6868
</div>
6969
</div>
7070
</div>

templates/repo/settings/options.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<tr>
9494
<td>{{(MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false).Address}}</td>
9595
<td>{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td>
96-
<td><relative-time format="datetime" weekday="" year="numeric" month="short" day="numeric" hour="numeric" minute="numeric", second="numeric" datetime="{{.Mirror.UpdatedUnix.FormatLong}}">{{.Mirror.UpdatedUnix.AsTime}}</relative-time></td>
96+
<td>{{template "shared/datetime/full" (dict "Datetime" .Mirror.UpdatedUnix.FormatLong "Fallback" .Mirror.UpdatedUnix.AsTime)}}</td>
9797
<td class="right aligned">
9898
<form method="post" style="display: inline-block">
9999
{{.CsrfTokenHtml}}
@@ -171,7 +171,7 @@
171171
{{$address := MirrorRemoteAddress $.Context $.Repository .GetRemoteName true}}
172172
<td>{{$address.Address}}</td>
173173
<td>{{$.locale.Tr "repo.settings.mirror_settings.direction.push"}}</td>
174-
<td>{{if .LastUpdateUnix}}<relative-time format="datetime" weekday="" year="numeric" month="short" day="numeric" hour="numeric" minute="numeric", second="numeric" datetime="{{.LastUpdateUnix.FormatLong}}">{{.LastUpdateUnix.AsTime}}</relative-time>{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label" data-tooltip-content="{{.LastError}}">{{$.locale.Tr "error"}}</div>{{end}}</td>
174+
<td>{{if .LastUpdateUnix}}{{template "shared/datetime/full" (dict "Datetime" .LastUpdateUnix.FormatLong "Fallback" .LastUpdateUnix.AsTime)}}{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label" data-tooltip-content="{{.LastError}}">{{$.locale.Tr "error"}}</div>{{end}}</td>
175175
<td class="right aligned">
176176
<form method="post" style="display: inline-block">
177177
{{$.CsrfTokenHtml}}

templates/repo/user_cards.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{else if .Location}}
1919
{{svg "octicon-location"}} {{.Location}}
2020
{{else}}
21-
{{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} <relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time>
21+
{{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} {{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}
2222
{{end}}
2323
</div>
2424
</li>

templates/shared/datetime/full.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<relative-time format="datetime" weekday="" year="numeric" month="short" day="numeric" hour="numeric" minute="numeric" second="numeric" datetime="{{.Datetime}}">{{.Fallback}}</relative-time>

templates/shared/datetime/long.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<relative-time format="datetime" year="numeric" month="long" day="numeric" weekday="" datetime="{{.Datetime}}">{{.Fallback}}</relative-time>

templates/shared/datetime/short.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.Datetime}}">{{.Fallback}}</relative-time>

templates/shared/issuelist.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<span class="due-date" data-tooltip-content="{{$.locale.Tr "repo.issues.due_date"}}">
107107
<span{{if .IsOverdue}} class="overdue"{{end}}>
108108
{{svg "octicon-calendar" 14 "gt-mr-2"}}
109-
<relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.DeadlineUnix.FormatDate}}">{{.DeadlineUnix.FormatShort}}</relative-time>
109+
{{template "shared/datetime/short" (dict "Datetime" .DeadlineUnix.FormatDate "Fallback" .DeadlineUnix.FormatShort)}}
110110
</span>
111111
</span>
112112
{{end}}

templates/user/profile.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</li>
5656
{{end}}
5757
{{end}}
58-
<li>{{svg "octicon-clock"}} {{.locale.Tr "user.join_on"}} <relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.Owner.CreatedUnix.FormatLong}}">{{.Owner.CreatedUnix.FormatShort}}</relative-time></li>
58+
<li>{{svg "octicon-clock"}} {{.locale.Tr "user.join_on"}} {{template "shared/datetime/short" (dict "Datetime" .Owner.CreatedUnix.FormatLong "Fallback" .Owner.CreatedUnix.FormatShort)}}</li>
5959
{{if and .Orgs .HasOrgsVisible}}
6060
<li>
6161
<ul class="user-orgs">

templates/user/settings/applications.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</ul>
3131
</details>
3232
<div class="activity meta">
33-
<i>{{$.locale.Tr "settings.add_on"}} <span><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time></span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.UpdatedUnix.FormatLong}}">{{.UpdatedUnix.FormatShort}}</relative-time></span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
33+
<i>{{$.locale.Tr "settings.add_on"}} <span>{{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{template "shared/datetime/short" (dict "Datetime" .UpdatedUnix.FormatLong "Fallback" .UpdatedUnix.FormatShort)}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
3434
</div>
3535
</div>
3636
</div>

templates/user/settings/grants_oauth2.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<div class="content">
2121
<strong>{{$grant.Application.Name}}</strong>
2222
<div class="activity meta">
23-
<i>{{$.locale.Tr "settings.add_on"}} <span><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{$grant.CreatedUnix.FormatLong}}">{{$grant.CreatedUnix.FormatShort}}</relative-time></span></i>
23+
<i>{{$.locale.Tr "settings.add_on"}} <span>{{template "shared/datetime/short" (dict "Datetime" $grant.CreatedUnix.FormatLong "Fallback" $grant.CreatedUnix.FormatShort)}}</span></i>
2424
</div>
2525
</div>
2626
</div>

templates/user/settings/keys_gpg.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@
6868
<b>{{$.locale.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.PaddedKeyID}} {{end}}
6969
</div>
7070
<div class="activity meta">
71-
<i>{{$.locale.Tr "settings.add_on"}} <span><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.AddedUnix.FormatLong}}">{{.AddedUnix.FormatShort}}</relative-time></span></i>
71+
<i>{{$.locale.Tr "settings.add_on"}} <span>{{template "shared/datetime/short" (dict "Datetime" .AddedUnix.FormatLong "Fallback" .AddedUnix.FormatShort)}}</span></i>
7272
-
73-
<i>{{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until"}} <span><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.ExpiredUnix.FormatLong}}">{{.ExpiredUnix.FormatShort}}</relative-time></span>{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}}</i>
73+
<i>{{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until"}} <span>{{template "shared/datetime/short" (dict "Datetime" .ExpiredUnix.FormatLong "Fallback" .ExpiredUnix.FormatShort)}}</span>{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}}</i>
7474
</div>
7575
</div>
7676
</div>

templates/user/settings/keys_principal.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<div class="content">
2626
<strong>{{.Name}}</strong>
2727
<div class="activity meta">
28-
<i>{{$.locale.Tr "settings.add_on"}} <span><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time></span> — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.UpdatedUnix.FormatLong}}">{{.UpdatedUnix.FormatShort}}</relative-time></span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
28+
<i>{{$.locale.Tr "settings.add_on"}} <span>{{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}</span> — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{template "shared/datetime/short" (dict "Datetime" .UpdatedUnix.FormatLong "Fallback" .UpdatedUnix.FormatShort)}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
2929
</div>
3030
</div>
3131
</div>

templates/user/settings/keys_ssh.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{{.Fingerprint}}
5959
</div>
6060
<div class="activity meta">
61-
<i>{{$.locale.Tr "settings.add_on"}} <span><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</relative-time></span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}><relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="{{.UpdatedUnix.FormatLong}}">{{.UpdatedUnix.FormatShort}}</relative-time></span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
61+
<i>{{$.locale.Tr "settings.add_on"}} <span>{{template "shared/datetime/short" (dict "Datetime" .CreatedUnix.FormatLong "Fallback" .CreatedUnix.FormatShort)}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{template "shared/datetime/short" (dict "Datetime" .UpdatedUnix.FormatLong "Fallback" .UpdatedUnix.FormatShort)}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
6262
</div>
6363
</div>
6464
</div>

0 commit comments

Comments
 (0)