mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 04:23:43 +08:00
FIX #1831: Dates were unbound on the profile page.
This commit is contained in:
parent
6131829df0
commit
f47e8e12dd
|
@ -327,7 +327,10 @@ Handlebars.registerHelper('unboundDate', function(property, options) {
|
|||
var date = new Date(val);
|
||||
return new Handlebars.SafeString(Discourse.Formatter.autoUpdatingRelativeAge(date, {format: 'medium', title: true, leaveAgo: leaveAgo}));
|
||||
}
|
||||
});
|
||||
|
||||
Ember.Handlebars.registerBoundHelper('date', function(dt) {
|
||||
return new Handlebars.SafeString(Discourse.Formatter.autoUpdatingRelativeAge(new Date(dt), {format: 'medium', title: true }));
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -58,13 +58,13 @@
|
|||
<dt>{{i18n user.website}}</dt><dd><a {{bindAttr href="website"}} target="_blank">{{websiteName}}</a></dd>
|
||||
{{/if}}
|
||||
{{#if created_at}}
|
||||
<dt>{{i18n user.created}}</dt><dd>{{unboundDate created_at}}</dd>
|
||||
<dt>{{i18n user.created}}</dt><dd>{{date created_at}}</dd>
|
||||
{{/if}}
|
||||
{{#if last_posted_at}}
|
||||
<dt>{{i18n user.last_posted}}</dt><dd>{{unboundDate last_posted_at}}</dd>
|
||||
<dt>{{i18n user.last_posted}}</dt><dd>{{date last_posted_at}}</dd>
|
||||
{{/if}}
|
||||
{{#if last_seen_at}}
|
||||
<dt>{{i18n user.last_seen}}</dt><dd>{{unboundDate last_seen_at}}</dd>
|
||||
<dt>{{i18n user.last_seen}}</dt><dd>{{date last_seen_at}}</dd>
|
||||
{{/if}}
|
||||
{{#if invited_by}}
|
||||
<dt>{{i18n user.invited_by}}</dt><dd>{{#link-to 'userActivity' invited_by}}{{invited_by.username}}{{/link-to}}</dd>
|
||||
|
|
Loading…
Reference in New Issue
Block a user