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'), }.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), hasHistory: Em.computed.gt('version', 1),
postElementId: Discourse.computed.fmt('post_number', 'post_%@'), postElementId: Discourse.computed.fmt('post_number', 'post_%@'),

View File

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

View File

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