mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add topic-creator class to post info on the left of a post if the poster started the topic
This commit is contained in:
parent
dd456df0cc
commit
f6db90dae7
@ -343,6 +343,7 @@ Discourse.Composer = Discourse.Model.extend({
|
|||||||
reply_count: 0,
|
reply_count: 0,
|
||||||
display_username: currentUser.get('name'),
|
display_username: currentUser.get('name'),
|
||||||
username: currentUser.get('username'),
|
username: currentUser.get('username'),
|
||||||
|
user_id: currentUser.get('id'),
|
||||||
metaData: this.get('metaData'),
|
metaData: this.get('metaData'),
|
||||||
archetype: this.get('archetypeId'),
|
archetype: this.get('archetypeId'),
|
||||||
post_type: Discourse.get('site.post_types.regular'),
|
post_type: Discourse.get('site.post_types.regular'),
|
||||||
|
@ -34,6 +34,10 @@ Discourse.Post = Discourse.Model.extend({
|
|||||||
return this.get('post_number') === 1;
|
return this.get('post_number') === 1;
|
||||||
}).property('post_number'),
|
}).property('post_number'),
|
||||||
|
|
||||||
|
byTopicCreator: function() {
|
||||||
|
return this.get('topic.created_by.id') === this.get('user_id');
|
||||||
|
}.property('topic.created_by.id', 'user_id'),
|
||||||
|
|
||||||
hasHistory: (function() {
|
hasHistory: (function() {
|
||||||
return this.get('version') > 1;
|
return this.get('version') > 1;
|
||||||
}).property('version'),
|
}).property('version'),
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class='topic-meta-data span2'>
|
<div class='topic-meta-data span2'>
|
||||||
<div class='contents'>
|
<div {{bindAttr class=":contents byTopicCreator:topic-creator"}}>
|
||||||
<a href='{{unbound usernameUrl}}'>{{avatar this imageSize="large"}}</a>
|
<a href='{{unbound usernameUrl}}'>{{avatar this imageSize="large"}}</a>
|
||||||
<h3 {{bindAttr class="moderator new_user"}}><a href='{{unbound usernameUrl}}'>{{breakUp username}}</a></h3>
|
<h3 {{bindAttr class="moderator new_user"}}><a href='{{unbound usernameUrl}}'>{{breakUp username}}</a></h3>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user