mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
rename date
to unboundDate
because it is unbound.
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
{{#if model.length}}
|
||||
{{#groupedEach model}}
|
||||
<tr>
|
||||
<td>{{date created_at}}</td>
|
||||
<td>{{unboundDate created_at}}</td>
|
||||
<td>
|
||||
{{#if user}}
|
||||
{{#link-to 'adminUser' user}}{{avatar user imageSize="tiny"}}{{/link-to}}
|
||||
|
@ -39,7 +39,7 @@
|
||||
{{#link-to 'adminUser' this.user}}{{avatar this.user imageSize="small"}} {{/link-to}}
|
||||
</td>
|
||||
<td>
|
||||
{{date this.flaggedAt}}
|
||||
{{unboundDate this.flaggedAt}}
|
||||
</td>
|
||||
<td>
|
||||
{{this.flagType}}
|
||||
|
@ -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) {
|
||||
|
@ -10,14 +10,14 @@
|
||||
<a href='{{unbound topic.url}}' {{bindAttr class=topic.ageCold}}>
|
||||
<h4>{{i18n created}}</h4>
|
||||
{{avatar details.created_by imageSize="tiny"}}
|
||||
{{date topic.created_at}}
|
||||
{{unboundDate topic.created_at}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a {{bindAttr href="topic.lastPostUrl"}}>
|
||||
<h4>{{i18n last_post}}</h4>
|
||||
{{avatar details.last_poster imageSize="tiny"}}
|
||||
{{date topic.last_posted_at}}
|
||||
{{unboundDate topic.last_posted_at}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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}} — <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}} — <span class="edit-reason">{{edit_reason}}</span>{{/if}}
|
||||
</div>
|
||||
<div id="revisions">
|
||||
{{{diff}}}
|
||||
|
@ -7,8 +7,8 @@
|
||||
{{/if}}
|
||||
|
||||
{{#if user}}
|
||||
<h3>{{i18n last_post}} {{date path="user.last_posted_at" leaveAgo="true"}}</h3>
|
||||
<h3>{{i18n joined}} {{date path="user.created_at" leaveAgo="true"}}</h3>
|
||||
<h3>{{i18n last_post}} {{unboundDate path="user.last_posted_at" leaveAgo="true"}}</h3>
|
||||
<h3>{{i18n joined}} {{unboundDate path="user.created_at" leaveAgo="true"}}</h3>
|
||||
|
||||
<div class='bottom'>
|
||||
{{#if user.bio_cooked}}<div class='bio'>{{{user.bio_cooked}}}</div>{{/if}}
|
||||
|
@ -30,8 +30,8 @@
|
||||
{{#linkTo 'user' user}}{{avatar user imageSize="tiny"}}{{/linkTo}}
|
||||
{{#linkTo 'user' user}}{{user.username}}{{/linkTo}}
|
||||
</td>
|
||||
<td>{{date redeemed_at}}</td>
|
||||
<td>{{date user.last_seen_at}}</td>
|
||||
<td>{{unboundDate redeemed_at}}</td>
|
||||
<td>{{unboundDate user.last_seen_at}}</td>
|
||||
<td>{{number user.topics_entered}}</td>
|
||||
<td>{{number user.posts_read_count}}</td>
|
||||
<td>{{{unbound user.time_read}}}</td>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div {{bindAttr class=":item hidden deleted moderator_action"}}>
|
||||
<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>
|
||||
<span class='time'>{{date path="created_at" leaveAgo="true"}}</span>
|
||||
<span class='time'>{{unboundDate path="created_at" leaveAgo="true"}}</span>
|
||||
<span class="title">
|
||||
<a href="{{unbound postUrl}}">{{unbound title}}</a>
|
||||
</span>
|
||||
|
@ -58,13 +58,13 @@
|
||||
<dt>{{i18n user.website}}</dt><dd><a {{bindAttr href="website"}} target="_blank">{{websiteName}}</a></dd>
|
||||
{{/if}}
|
||||
{{#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 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 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 invited_by}}
|
||||
<dt>{{i18n user.invited_by}}</dt><dd>{{#link-to 'userActivity' invited_by}}{{invited_by.username}}{{/link-to}}</dd>
|
||||
|
Reference in New Issue
Block a user