mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05: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
3 changed files with 6 additions and 1 deletions
|
@ -343,6 +343,7 @@ Discourse.Composer = Discourse.Model.extend({
|
|||
reply_count: 0,
|
||||
display_username: currentUser.get('name'),
|
||||
username: currentUser.get('username'),
|
||||
user_id: currentUser.get('id'),
|
||||
metaData: this.get('metaData'),
|
||||
archetype: this.get('archetypeId'),
|
||||
post_type: Discourse.get('site.post_types.regular'),
|
||||
|
|
|
@ -34,6 +34,10 @@ Discourse.Post = Discourse.Model.extend({
|
|||
return this.get('post_number') === 1;
|
||||
}).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() {
|
||||
return this.get('version') > 1;
|
||||
}).property('version'),
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
{{/if}}
|
||||
|
||||
<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>
|
||||
<h3 {{bindAttr class="moderator new_user"}}><a href='{{unbound usernameUrl}}'>{{breakUp username}}</a></h3>
|
||||
|
||||
|
|
Loading…
Reference in a new issue