From f4c57130dc532569f6146b09a37654a41b273904 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 17 Jan 2014 13:56:26 -0500 Subject: [PATCH] Renames `unboundDate` to `rawDate` because `date` is current unbound. --- .../javascripts/discourse/helpers/application_helpers.js | 8 ++++---- .../templates/components/basic-topic-list.js.handlebars | 6 +++--- .../discourse/templates/featured_topics.js.handlebars | 2 +- .../templates/list/topic_list_item.js.handlebars | 6 +++--- .../mobile/components/basic-topic-list.js.handlebars | 4 ++-- .../templates/mobile/list/topic_list_item.js.handlebars | 4 ++-- .../javascripts/discourse/templates/post.js.handlebars | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/assets/javascripts/discourse/helpers/application_helpers.js b/app/assets/javascripts/discourse/helpers/application_helpers.js index f9f968c2b..60ced0534 100644 --- a/app/assets/javascripts/discourse/helpers/application_helpers.js +++ b/app/assets/javascripts/discourse/helpers/application_helpers.js @@ -200,12 +200,12 @@ Ember.Handlebars.registerBoundHelper('boundAvatar', function(user, options) { }, 'avatar_template', 'uploaded_avatar_template', 'gravatar_template'); /** - Nicely format a date without a binding since the date doesn't need to change. + Nicely format a date without binding or returning HTML - @method unboundDate + @method rawDate @for Handlebars **/ -Handlebars.registerHelper('unboundDate', function(property, options) { +Handlebars.registerHelper('rawDate', function(property, options) { var dt = new Date(Ember.Handlebars.get(this, property, options)); return Discourse.Formatter.longDate(dt); }); @@ -213,7 +213,7 @@ Handlebars.registerHelper('unboundDate', function(property, options) { /** Live refreshing age helper - @method unboundDate + @method rawDate @for Handlebars **/ Handlebars.registerHelper('unboundAge', function(property, options) { diff --git a/app/assets/javascripts/discourse/templates/components/basic-topic-list.js.handlebars b/app/assets/javascripts/discourse/templates/components/basic-topic-list.js.handlebars index cb254e0f0..3be634a01 100644 --- a/app/assets/javascripts/discourse/templates/components/basic-topic-list.js.handlebars +++ b/app/assets/javascripts/discourse/templates/components/basic-topic-list.js.handlebars @@ -53,14 +53,14 @@ {{number topic.views numberKey="views_long"}} {{#if topic.bumped}} - {{unboundAge topic.created_at}} + {{unboundAge topic.created_at}} - {{unboundAge topic.bumped_at}} + {{unboundAge topic.bumped_at}} {{else}} - {{unboundAge topic.created_at}} + {{unboundAge topic.created_at}} {{/if}} diff --git a/app/assets/javascripts/discourse/templates/featured_topics.js.handlebars b/app/assets/javascripts/discourse/templates/featured_topics.js.handlebars index 9e43e657f..0290ef5b9 100644 --- a/app/assets/javascripts/discourse/templates/featured_topics.js.handlebars +++ b/app/assets/javascripts/discourse/templates/featured_topics.js.handlebars @@ -52,7 +52,7 @@ {{number posts_count}} - {{{unboundAge created_at}}} + {{{unboundAge created_at}}} {{/each}} diff --git a/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars b/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars index a401736b6..e0b611ac4 100644 --- a/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars +++ b/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars @@ -65,14 +65,14 @@ {{#if bumped}} - {{unboundAge created_at}} + {{unboundAge created_at}} - {{unboundAge bumped_at}} + {{unboundAge bumped_at}} {{else}} - {{unboundAge created_at}} + {{unboundAge created_at}} {{/if}} diff --git a/app/assets/javascripts/discourse/templates/mobile/components/basic-topic-list.js.handlebars b/app/assets/javascripts/discourse/templates/mobile/components/basic-topic-list.js.handlebars index 8bbb6e486..a7ab59e46 100644 --- a/app/assets/javascripts/discourse/templates/mobile/components/basic-topic-list.js.handlebars +++ b/app/assets/javascripts/discourse/templates/mobile/components/basic-topic-list.js.handlebars @@ -50,11 +50,11 @@ {{#if bumped}}
- {{unboundAge bumped_at}} + {{unboundAge bumped_at}}
{{else}}
- {{unboundAge created_at}} + {{unboundAge created_at}}
{{/if}} diff --git a/app/assets/javascripts/discourse/templates/mobile/list/topic_list_item.js.handlebars b/app/assets/javascripts/discourse/templates/mobile/list/topic_list_item.js.handlebars index ffc5d3d17..bbd18a921 100644 --- a/app/assets/javascripts/discourse/templates/mobile/list/topic_list_item.js.handlebars +++ b/app/assets/javascripts/discourse/templates/mobile/list/topic_list_item.js.handlebars @@ -54,11 +54,11 @@ {{#if bumped}}
- {{unboundAge bumped_at}} + {{unboundAge bumped_at}}
{{else}}
- {{unboundAge created_at}} + {{unboundAge created_at}}
{{/if}} diff --git a/app/assets/javascripts/discourse/templates/post.js.handlebars b/app/assets/javascripts/discourse/templates/post.js.handlebars index 46d0c53e4..635c570eb 100644 --- a/app/assets/javascripts/discourse/templates/post.js.handlebars +++ b/app/assets/javascripts/discourse/templates/post.js.handlebars @@ -50,12 +50,12 @@ {{#if hasHistory}}
{{#if canViewEditHistory}} - + {{editCount}} {{else}} - + {{editCount}}