diff --git a/app/assets/javascripts/admin/templates/email_logs.js.handlebars b/app/assets/javascripts/admin/templates/email_logs.js.handlebars index 508f72566e9..c0130f3660c 100644 --- a/app/assets/javascripts/admin/templates/email_logs.js.handlebars +++ b/app/assets/javascripts/admin/templates/email_logs.js.handlebars @@ -12,7 +12,7 @@ {{#if model.length}} {{#groupedEach model}} - {{date created_at}} + {{unboundDate created_at}} {{#if user}} {{#link-to 'adminUser' user}}{{avatar user imageSize="tiny"}}{{/link-to}} diff --git a/app/assets/javascripts/admin/templates/flags.js.handlebars b/app/assets/javascripts/admin/templates/flags.js.handlebars index 0680e61c625..389456d23f6 100644 --- a/app/assets/javascripts/admin/templates/flags.js.handlebars +++ b/app/assets/javascripts/admin/templates/flags.js.handlebars @@ -39,7 +39,7 @@ {{#link-to 'adminUser' this.user}}{{avatar this.user imageSize="small"}} {{/link-to}} - {{date this.flaggedAt}} + {{unboundDate this.flaggedAt}} {{this.flagType}} diff --git a/app/assets/javascripts/discourse/helpers/application_helpers.js b/app/assets/javascripts/discourse/helpers/application_helpers.js index 680ce5a127b..2b9abde9b17 100644 --- a/app/assets/javascripts/discourse/helpers/application_helpers.js +++ b/app/assets/javascripts/discourse/helpers/application_helpers.js @@ -305,12 +305,13 @@ Handlebars.registerHelper('number', function(property, options) { }); /** - Display logic for dates. + Display logic for dates. It is unbound in Ember but will use jQuery to + update the dates on a regular interval. - @method date + @method unboundDate @for Handlebars **/ -Handlebars.registerHelper('date', function(property, options) { +Handlebars.registerHelper('unboundDate', function(property, options) { var leaveAgo; if (property.hash) { if (property.hash.leaveAgo) { diff --git a/app/assets/javascripts/discourse/templates/components/topic-map.js.handlebars b/app/assets/javascripts/discourse/templates/components/topic-map.js.handlebars index d9a415ef146..b9dec175766 100644 --- a/app/assets/javascripts/discourse/templates/components/topic-map.js.handlebars +++ b/app/assets/javascripts/discourse/templates/components/topic-map.js.handlebars @@ -10,14 +10,14 @@

{{i18n created}}

{{avatar details.created_by imageSize="tiny"}} - {{date topic.created_at}} + {{unboundDate topic.created_at}}
  • {{i18n last_post}}

    {{avatar details.last_poster imageSize="tiny"}} - {{date topic.last_posted_at}} + {{unboundDate topic.last_posted_at}}
  • diff --git a/app/assets/javascripts/discourse/templates/modal/history.js.handlebars b/app/assets/javascripts/discourse/templates/modal/history.js.handlebars index ca9df8eb507..a2bebd77851 100644 --- a/app/assets/javascripts/discourse/templates/modal/history.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/history.js.handlebars @@ -19,7 +19,7 @@
    - {{i18n post.revisions.details.edited_by}} {{avatar this imageSize="small"}} {{username}} {{date path="created_at" leaveAgo="true"}} {{#if edit_reason}} — {{edit_reason}}{{/if}} + {{i18n post.revisions.details.edited_by}} {{avatar this imageSize="small"}} {{username}} {{unboundDate path="created_at" leaveAgo="true"}} {{#if edit_reason}} — {{edit_reason}}{{/if}}
    {{{diff}}} diff --git a/app/assets/javascripts/discourse/templates/poster_expansion.handlebars b/app/assets/javascripts/discourse/templates/poster_expansion.handlebars index d0146471571..078bd69e65f 100644 --- a/app/assets/javascripts/discourse/templates/poster_expansion.handlebars +++ b/app/assets/javascripts/discourse/templates/poster_expansion.handlebars @@ -7,8 +7,8 @@ {{/if}} {{#if user}} -

    {{i18n last_post}} {{date path="user.last_posted_at" leaveAgo="true"}}

    -

    {{i18n joined}} {{date path="user.created_at" leaveAgo="true"}}

    +

    {{i18n last_post}} {{unboundDate path="user.last_posted_at" leaveAgo="true"}}

    +

    {{i18n joined}} {{unboundDate path="user.created_at" leaveAgo="true"}}

    {{#if user.bio_cooked}}
    {{{user.bio_cooked}}}
    {{/if}} diff --git a/app/assets/javascripts/discourse/templates/user/invited.js.handlebars b/app/assets/javascripts/discourse/templates/user/invited.js.handlebars index ad8851e07ba..098af2258f9 100644 --- a/app/assets/javascripts/discourse/templates/user/invited.js.handlebars +++ b/app/assets/javascripts/discourse/templates/user/invited.js.handlebars @@ -30,8 +30,8 @@ {{#linkTo 'user' user}}{{avatar user imageSize="tiny"}}{{/linkTo}} {{#linkTo 'user' user}}{{user.username}}{{/linkTo}} - {{date redeemed_at}} - {{date user.last_seen_at}} + {{unboundDate redeemed_at}} + {{unboundDate user.last_seen_at}} {{number user.topics_entered}} {{number user.posts_read_count}} {{{unbound user.time_read}}} diff --git a/app/assets/javascripts/discourse/templates/user/stream.js.handlebars b/app/assets/javascripts/discourse/templates/user/stream.js.handlebars index 293ceb1013f..953895c2aa5 100644 --- a/app/assets/javascripts/discourse/templates/user/stream.js.handlebars +++ b/app/assets/javascripts/discourse/templates/user/stream.js.handlebars @@ -2,7 +2,7 @@