rename date to unboundDate because it is unbound.

This commit is contained in:
Robin Ward
2014-01-17 15:23:51 -05:00
parent bc2993b458
commit 6131829df0
9 changed files with 17 additions and 16 deletions

View File

@ -12,7 +12,7 @@
{{#if model.length}} {{#if model.length}}
{{#groupedEach model}} {{#groupedEach model}}
<tr> <tr>
<td>{{date created_at}}</td> <td>{{unboundDate created_at}}</td>
<td> <td>
{{#if user}} {{#if user}}
{{#link-to 'adminUser' user}}{{avatar user imageSize="tiny"}}{{/link-to}} {{#link-to 'adminUser' user}}{{avatar user imageSize="tiny"}}{{/link-to}}

View File

@ -39,7 +39,7 @@
{{#link-to 'adminUser' this.user}}{{avatar this.user imageSize="small"}} {{/link-to}} {{#link-to 'adminUser' this.user}}{{avatar this.user imageSize="small"}} {{/link-to}}
</td> </td>
<td> <td>
{{date this.flaggedAt}} {{unboundDate this.flaggedAt}}
</td> </td>
<td> <td>
{{this.flagType}} {{this.flagType}}

View File

@ -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 @for Handlebars
**/ **/
Handlebars.registerHelper('date', function(property, options) { Handlebars.registerHelper('unboundDate', function(property, options) {
var leaveAgo; var leaveAgo;
if (property.hash) { if (property.hash) {
if (property.hash.leaveAgo) { if (property.hash.leaveAgo) {

View File

@ -10,14 +10,14 @@
<a href='{{unbound topic.url}}' {{bindAttr class=topic.ageCold}}> <a href='{{unbound topic.url}}' {{bindAttr class=topic.ageCold}}>
<h4>{{i18n created}}</h4> <h4>{{i18n created}}</h4>
{{avatar details.created_by imageSize="tiny"}} {{avatar details.created_by imageSize="tiny"}}
{{date topic.created_at}} {{unboundDate topic.created_at}}
</a> </a>
</li> </li>
<li> <li>
<a {{bindAttr href="topic.lastPostUrl"}}> <a {{bindAttr href="topic.lastPostUrl"}}>
<h4>{{i18n last_post}}</h4> <h4>{{i18n last_post}}</h4>
{{avatar details.last_poster imageSize="tiny"}} {{avatar details.last_poster imageSize="tiny"}}
{{date topic.last_posted_at}} {{unboundDate topic.last_posted_at}}
</a> </a>
</li> </li>
<li> <li>

View File

@ -19,7 +19,7 @@
</div> </div>
</div> </div>
<div id="revision-details"> <div id="revision-details">
{{i18n post.revisions.details.edited_by}} {{avatar this imageSize="small"}} {{username}} <span class="date">{{date path="created_at" leaveAgo="true"}}</span> {{#if edit_reason}} &mdash; <span class="edit-reason">{{edit_reason}}</span>{{/if}} {{i18n post.revisions.details.edited_by}} {{avatar this imageSize="small"}} {{username}} <span class="date">{{unboundDate path="created_at" leaveAgo="true"}}</span> {{#if edit_reason}} &mdash; <span class="edit-reason">{{edit_reason}}</span>{{/if}}
</div> </div>
<div id="revisions"> <div id="revisions">
{{{diff}}} {{{diff}}}

View File

@ -7,8 +7,8 @@
{{/if}} {{/if}}
{{#if user}} {{#if user}}
<h3>{{i18n last_post}} {{date path="user.last_posted_at" leaveAgo="true"}}</h3> <h3>{{i18n last_post}} {{unboundDate path="user.last_posted_at" leaveAgo="true"}}</h3>
<h3>{{i18n joined}} {{date path="user.created_at" leaveAgo="true"}}</h3> <h3>{{i18n joined}} {{unboundDate path="user.created_at" leaveAgo="true"}}</h3>
<div class='bottom'> <div class='bottom'>
{{#if user.bio_cooked}}<div class='bio'>{{{user.bio_cooked}}}</div>{{/if}} {{#if user.bio_cooked}}<div class='bio'>{{{user.bio_cooked}}}</div>{{/if}}

View File

@ -30,8 +30,8 @@
{{#linkTo 'user' user}}{{avatar user imageSize="tiny"}}{{/linkTo}} {{#linkTo 'user' user}}{{avatar user imageSize="tiny"}}{{/linkTo}}
{{#linkTo 'user' user}}{{user.username}}{{/linkTo}} {{#linkTo 'user' user}}{{user.username}}{{/linkTo}}
</td> </td>
<td>{{date redeemed_at}}</td> <td>{{unboundDate redeemed_at}}</td>
<td>{{date user.last_seen_at}}</td> <td>{{unboundDate user.last_seen_at}}</td>
<td>{{number user.topics_entered}}</td> <td>{{number user.topics_entered}}</td>
<td>{{number user.posts_read_count}}</td> <td>{{number user.posts_read_count}}</td>
<td>{{{unbound user.time_read}}}</td> <td>{{{unbound user.time_read}}}</td>

View File

@ -2,7 +2,7 @@
<div {{bindAttr class=":item hidden deleted moderator_action"}}> <div {{bindAttr class=":item hidden deleted moderator_action"}}>
<div class='clearfix info'> <div class='clearfix info'>
<a href="{{unbound userUrl}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar this imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div></a> <a href="{{unbound userUrl}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar this imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div></a>
<span class='time'>{{date path="created_at" leaveAgo="true"}}</span> <span class='time'>{{unboundDate path="created_at" leaveAgo="true"}}</span>
<span class="title"> <span class="title">
<a href="{{unbound postUrl}}">{{unbound title}}</a> <a href="{{unbound postUrl}}">{{unbound title}}</a>
</span> </span>

View File

@ -58,13 +58,13 @@
<dt>{{i18n user.website}}</dt><dd><a {{bindAttr href="website"}} target="_blank">{{websiteName}}</a></dd> <dt>{{i18n user.website}}</dt><dd><a {{bindAttr href="website"}} target="_blank">{{websiteName}}</a></dd>
{{/if}} {{/if}}
{{#if created_at}} {{#if created_at}}
<dt>{{i18n user.created}}</dt><dd>{{date created_at}}</dd> <dt>{{i18n user.created}}</dt><dd>{{unboundDate created_at}}</dd>
{{/if}} {{/if}}
{{#if last_posted_at}} {{#if last_posted_at}}
<dt>{{i18n user.last_posted}}</dt><dd>{{date last_posted_at}}</dd> <dt>{{i18n user.last_posted}}</dt><dd>{{unboundDate last_posted_at}}</dd>
{{/if}} {{/if}}
{{#if last_seen_at}} {{#if last_seen_at}}
<dt>{{i18n user.last_seen}}</dt><dd>{{date last_seen_at}}</dd> <dt>{{i18n user.last_seen}}</dt><dd>{{unboundDate last_seen_at}}</dd>
{{/if}} {{/if}}
{{#if invited_by}} {{#if invited_by}}
<dt>{{i18n user.invited_by}}</dt><dd>{{#link-to 'userActivity' invited_by}}{{invited_by.username}}{{/link-to}}</dd> <dt>{{i18n user.invited_by}}</dt><dd>{{#link-to 'userActivity' invited_by}}{{invited_by.username}}{{/link-to}}</dd>