FIX: add topic-owner class to all the posts created by the OP

This commit is contained in:
Régis Hanol 2014-12-17 16:25:31 +01:00
parent 2ca0a307de
commit fc85760bc0
3 changed files with 13 additions and 13 deletions

View File

@ -60,7 +60,7 @@ Discourse.Post = Discourse.Model.extend({
);
}.property('reply_to_user', 'reply_to_post_number', 'post_number'),
byTopicCreator: Discourse.computed.propertyEqual('topic.details.created_by.id', 'user_id'),
topicOwner: Discourse.computed.propertyEqual('topic.details.created_by.id', 'user_id'),
hasHistory: Em.computed.gt('version', 1),
postElementId: Discourse.computed.fmt('post_number', 'post_%@'),

View File

@ -29,12 +29,12 @@
{{#if can_view_edit_history}}
<a href class="{{unbound view.historyHeat}}" {{action "showHistory" this}} title="{{i18n 'post.last_edited_on'}} {{raw-date updated_at}}">
{{editCount}}
<i class='fa fa-pencil'></i>
{{fa-icon "pencil"}}
</a>
{{else}}
<span class="{{unbound view.historyHeat}}" title="{{i18n 'post.last_edited_on'}} {{raw-date updated_at}}">
{{editCount}}
<i class='fa fa-pencil'></i>
{{fa-icon "pencil"}}
</span>
{{/if}}
</div>
@ -50,15 +50,15 @@
{{/if}}
{{/unboundIf}}
{{#unboundIf showUserReplyTab}}
<a href {{action "toggleReplyHistory" this target="view"}} class='reply-to-tab'>
{{#if loadingReplyHistory}}
{{i18n 'loading'}}
{{else}}
<i class="fa fa-mail-forward"></i>
{{avatar reply_to_user imageSize="tiny"}}
<span>{{reply_to_user.username}}</span>
{{/if}}
</a>
<a href {{action "toggleReplyHistory" this target="view"}} class='reply-to-tab'>
{{#if loadingReplyHistory}}
{{i18n 'loading'}}
{{else}}
{{fa-icon "mail-forward"}}
{{avatar reply_to_user imageSize="tiny"}}
<span>{{reply_to_user.username}}</span>
{{/if}}
</a>
{{/unboundIf}}
<div {{bind-attr class=":read-state read"}} title="{{i18n 'post.unread'}}">{{fa-icon "circle"}}</div>
</div>

View File

@ -7,7 +7,7 @@ Discourse.PostView = Discourse.GroupedView.extend(Ember.Evented, {
'selected',
'post.hidden:post-hidden',
'post.deleted',
'byTopicCreator:topic-creator',
'post.topicOwner:topic-owner',
'groupNameClass',
'post.wiki:wiki'],
postBinding: 'content',