mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 08:59:41 +08:00
UX: Don't show the group full name if it's the same as the title
This commit is contained in:
parent
9150573969
commit
1e5e5acd4d
@ -0,0 +1,10 @@
|
||||
import computed from 'ember-addons/ember-computed-decorators';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'span',
|
||||
|
||||
@computed('group.full_name', 'group.title')
|
||||
showFullName(fullName, title) {
|
||||
return fullName && fullName.length && fullName !== title;
|
||||
}
|
||||
});
|
@ -0,0 +1,11 @@
|
||||
<span class='groups-info-name'>{{group.displayName}}</span>
|
||||
|
||||
{{#if showFullName}}
|
||||
<span class='groups-info-full-name'>{{group.full_name}}</span>
|
||||
{{/if}}
|
||||
|
||||
{{#if group.title}}
|
||||
<div>
|
||||
<span class='groups-info-title'>{{group.title}}</span>
|
||||
</div>
|
||||
{{/if}}
|
@ -50,19 +50,7 @@
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
<span>
|
||||
<span class='groups-info-name'>{{group.displayName}}</span>
|
||||
|
||||
{{#if group.full_name}}
|
||||
<span class='groups-info-full-name'>{{group.full_name}}</span>
|
||||
{{/if}}
|
||||
|
||||
{{#if group.title}}
|
||||
<div>
|
||||
<span class='groups-info-title'>{{group.title}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{groups-info group=group}}
|
||||
{{/link-to}}
|
||||
</td>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user