Renames unboundDate to rawDate because date is current unbound.

This commit is contained in:
Robin Ward 2014-01-17 13:56:26 -05:00
parent 18e719b0af
commit f4c57130dc
7 changed files with 17 additions and 17 deletions

View file

@ -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) {

View file

@ -53,14 +53,14 @@
<td {{bindAttr class=":num :views topic.viewsHeat"}}>{{number topic.views numberKey="views_long"}}</td>
{{#if topic.bumped}}
<td class='num activity'>
<a href="{{unbound topic.url}}" {{{bindAttr class=":age topic.ageCold"}}} title='{{i18n first_post}}: {{{unboundDate topic.created_at}}}' >{{unboundAge topic.created_at}}</a>
<a href="{{unbound topic.url}}" {{{bindAttr class=":age topic.ageCold"}}} title='{{i18n first_post}}: {{{rawDate topic.created_at}}}' >{{unboundAge topic.created_at}}</a>
</td>
<td class='num activity last'>
<a href="{{unbound topic.lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{unboundDate topic.bumped_at}}}'>{{unboundAge topic.bumped_at}}</a>
<a href="{{unbound topic.lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{rawDate topic.bumped_at}}}'>{{unboundAge topic.bumped_at}}</a>
</td>
{{else}}
<td class='num activity'>
<a href="{{unbound topic.url}}" class='age' title='{{i18n first_post}}: {{{unboundDate topic.created_at}}}'>{{unboundAge topic.created_at}}</a>
<a href="{{unbound topic.url}}" class='age' title='{{i18n first_post}}: {{{rawDate topic.created_at}}}'>{{unboundAge topic.created_at}}</a>
</td>
<td class="activity"></td>
{{/if}}

View file

@ -52,7 +52,7 @@
</div>
</td>
<td class='num posts'><span class='badge-posts'>{{number posts_count}}</span></td>
<td class='num age'><span {{bindAttr class=":age ageCold"}} title='{{unboundDate created_at}}'>{{{unboundAge created_at}}}</span></td>
<td class='num age'><span {{bindAttr class=":age ageCold"}} title='{{rawDate created_at}}'>{{{unboundAge created_at}}}</span></td>
</tr>
{{/each}}

View file

@ -65,14 +65,14 @@
{{#if bumped}}
<td class='num activity'>
<a href="{{url}}" {{{bindAttr class=":age ageCold"}}} title='{{i18n first_post}}: {{{unboundDate created_at}}}' >{{unboundAge created_at}}</a>
<a href="{{url}}" {{{bindAttr class=":age ageCold"}}} title='{{i18n first_post}}: {{{rawDate created_at}}}' >{{unboundAge created_at}}</a>
</td>
<td class='num activity last'>
<a href="{{lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{unboundDate bumped_at}}}'>{{unboundAge bumped_at}}</a>
<a href="{{lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{rawDate bumped_at}}}'>{{unboundAge bumped_at}}</a>
</td>
{{else}}
<td class='num activity'>
<a href="{{url}}" class='age' title='{{i18n first_post}}: {{{unboundDate created_at}}}'>{{unboundAge created_at}}</a>
<a href="{{url}}" class='age' title='{{i18n first_post}}: {{{rawDate created_at}}}'>{{unboundAge created_at}}</a>
</td>
<td class='activity'></td>
{{/if}}

View file

@ -50,11 +50,11 @@
</div>
{{#if bumped}}
<div class='num activity last'>
<a href="{{lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{unboundDate bumped_at}}}'>{{unboundAge bumped_at}}</a>
<a href="{{lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{rawDate bumped_at}}}'>{{unboundAge bumped_at}}</a>
</div>
{{else}}
<div class='num activity last'>
<a href="{{url}}" class='age' title='{{i18n first_post}}: {{{unboundDate created_at}}}'>{{unboundAge created_at}}</a>
<a href="{{url}}" class='age' title='{{i18n first_post}}: {{{rawDate created_at}}}'>{{unboundAge created_at}}</a>
</div>
{{/if}}
</div>

View file

@ -54,11 +54,11 @@
{{#if bumped}}
<div class='num activity last'>
<a href="{{lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{unboundDate bumped_at}}}'>{{unboundAge bumped_at}}</a>
<a href="{{lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{rawDate bumped_at}}}'>{{unboundAge bumped_at}}</a>
</div>
{{else}}
<div class='num activity last'>
<a href="{{url}}" class='age' title='{{i18n first_post}}: {{{unboundDate created_at}}}'>{{unboundAge created_at}}</a>
<a href="{{url}}" class='age' title='{{i18n first_post}}: {{{rawDate created_at}}}'>{{unboundAge created_at}}</a>
</div>
{{/if}}
</div>

View file

@ -50,12 +50,12 @@
{{#if hasHistory}}
<div class='post-info edits'>
{{#if canViewEditHistory}}
<a href='#' class="{{unbound historyHeat}}" {{action showHistory this}} title="{{i18n post.last_edited_on}} {{unboundDate updated_at}}">
<a href='#' class="{{unbound historyHeat}}" {{action showHistory this}} title="{{i18n post.last_edited_on}} {{rawDate updated_at}}">
{{editCount}}
<i class='fa fa-pencil'></i>
</a>
{{else}}
<span class="{{unbound historyHeat}}" title="{{i18n post.last_edited_on}} {{unboundDate updated_at}}">
<span class="{{unbound historyHeat}}" title="{{i18n post.last_edited_on}} {{rawDate updated_at}}">
{{editCount}}
<i class='fa fa-pencil'></i>
</span>