Supress full name in expansion if it's the same as the username
This commit is contained in:
parent
e7935d4263
commit
50c74237cb
|
@ -12,6 +12,7 @@ Discourse.PosterExpansionController = Discourse.ObjectController.extend({
|
||||||
user: null,
|
user: null,
|
||||||
|
|
||||||
showFilter: Em.computed.alias('controllers.topic.postStream.hasNoFilters'),
|
showFilter: Em.computed.alias('controllers.topic.postStream.hasNoFilters'),
|
||||||
|
showName: Discourse.computed.propertyNotEqual('user.name', 'user.username'),
|
||||||
|
|
||||||
show: function(post) {
|
show: function(post) {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
{{boundAvatar model imageSize="huge"}}
|
{{boundAvatar model imageSize="huge"}}
|
||||||
|
|
||||||
<h1><a {{bindAttr href="usernameUrl"}}>{{username}}</a></h1>
|
<h1><a {{bindAttr href="usernameUrl"}}>{{username}}</a></h1>
|
||||||
<h2>{{name}}</h2>
|
{{#if showName}}
|
||||||
|
<h2><a {{bindAttr href="usernameUrl"}}>{{name}}</a></h2>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if user}}
|
{{#if user}}
|
||||||
<h3>{{i18n last_post}} {{date path="user.last_posted_at" leaveAgo="true"}}</h3>
|
<h3>{{i18n last_post}} {{date path="user.last_posted_at" leaveAgo="true"}}</h3>
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
|
|
Loading…
Reference in New Issue