Supress full name in expansion if it's the same as the username

This commit is contained in:
Robin Ward 2013-10-08 11:28:32 -04:00
parent e7935d4263
commit 50c74237cb
3 changed files with 8 additions and 1 deletions

View File

@ -12,6 +12,7 @@ Discourse.PosterExpansionController = Discourse.ObjectController.extend({
user: null,
showFilter: Em.computed.alias('controllers.topic.postStream.hasNoFilters'),
showName: Discourse.computed.propertyNotEqual('user.name', 'user.username'),
show: function(post) {

View File

@ -2,7 +2,9 @@
{{boundAvatar model imageSize="huge"}}
<h1><a {{bindAttr href="usernameUrl"}}>{{username}}</a></h1>
<h2>{{name}}</h2>
{{#if showName}}
<h2><a {{bindAttr href="usernameUrl"}}>{{name}}</a></h2>
{{/if}}
{{#if user}}
<h3>{{i18n last_post}} {{date path="user.last_posted_at" leaveAgo="true"}}</h3>

View File

@ -27,6 +27,10 @@
font-size: 20px;
line-height: 22px;
font-weight: normal;
a {
color: #333;
}
}
h3 {