mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
Renames unboundDate
to rawDate
because date
is current unbound.
This commit is contained in:
parent
18e719b0af
commit
f4c57130dc
7 changed files with 17 additions and 17 deletions
|
@ -200,12 +200,12 @@ Ember.Handlebars.registerBoundHelper('boundAvatar', function(user, options) {
|
||||||
}, 'avatar_template', 'uploaded_avatar_template', 'gravatar_template');
|
}, '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
|
@for Handlebars
|
||||||
**/
|
**/
|
||||||
Handlebars.registerHelper('unboundDate', function(property, options) {
|
Handlebars.registerHelper('rawDate', function(property, options) {
|
||||||
var dt = new Date(Ember.Handlebars.get(this, property, options));
|
var dt = new Date(Ember.Handlebars.get(this, property, options));
|
||||||
return Discourse.Formatter.longDate(dt);
|
return Discourse.Formatter.longDate(dt);
|
||||||
});
|
});
|
||||||
|
@ -213,7 +213,7 @@ Handlebars.registerHelper('unboundDate', function(property, options) {
|
||||||
/**
|
/**
|
||||||
Live refreshing age helper
|
Live refreshing age helper
|
||||||
|
|
||||||
@method unboundDate
|
@method rawDate
|
||||||
@for Handlebars
|
@for Handlebars
|
||||||
**/
|
**/
|
||||||
Handlebars.registerHelper('unboundAge', function(property, options) {
|
Handlebars.registerHelper('unboundAge', function(property, options) {
|
||||||
|
|
|
@ -53,14 +53,14 @@
|
||||||
<td {{bindAttr class=":num :views topic.viewsHeat"}}>{{number topic.views numberKey="views_long"}}</td>
|
<td {{bindAttr class=":num :views topic.viewsHeat"}}>{{number topic.views numberKey="views_long"}}</td>
|
||||||
{{#if topic.bumped}}
|
{{#if topic.bumped}}
|
||||||
<td class='num activity'>
|
<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>
|
||||||
<td class='num activity last'>
|
<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>
|
</td>
|
||||||
{{else}}
|
{{else}}
|
||||||
<td class='num activity'>
|
<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>
|
||||||
<td class="activity"></td>
|
<td class="activity"></td>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class='num posts'><span class='badge-posts'>{{number posts_count}}</span></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>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
|
|
|
@ -65,14 +65,14 @@
|
||||||
|
|
||||||
{{#if bumped}}
|
{{#if bumped}}
|
||||||
<td class='num activity'>
|
<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>
|
||||||
<td class='num activity last'>
|
<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>
|
</td>
|
||||||
{{else}}
|
{{else}}
|
||||||
<td class='num activity'>
|
<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>
|
||||||
<td class='activity'></td>
|
<td class='activity'></td>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -50,11 +50,11 @@
|
||||||
</div>
|
</div>
|
||||||
{{#if bumped}}
|
{{#if bumped}}
|
||||||
<div class='num activity last'>
|
<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>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class='num activity last'>
|
<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>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -54,11 +54,11 @@
|
||||||
|
|
||||||
{{#if bumped}}
|
{{#if bumped}}
|
||||||
<div class='num activity last'>
|
<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>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class='num activity last'>
|
<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>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -50,12 +50,12 @@
|
||||||
{{#if hasHistory}}
|
{{#if hasHistory}}
|
||||||
<div class='post-info edits'>
|
<div class='post-info edits'>
|
||||||
{{#if canViewEditHistory}}
|
{{#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}}
|
{{editCount}}
|
||||||
<i class='fa fa-pencil'></i>
|
<i class='fa fa-pencil'></i>
|
||||||
</a>
|
</a>
|
||||||
{{else}}
|
{{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}}
|
{{editCount}}
|
||||||
<i class='fa fa-pencil'></i>
|
<i class='fa fa-pencil'></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in a new issue