mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 05:43:16 +08:00
FIX: Edge case. Don't show "Others with this badge" when just you
This commit is contained in:
parent
0396b14b70
commit
fd2b8dd12f
|
@ -48,6 +48,11 @@ export default Ember.Controller.extend({
|
|||
return grantCount > (userBadgeLength || 0);
|
||||
},
|
||||
|
||||
@computed('user', 'model.grant_count')
|
||||
canShowOthers(user, grantCount) {
|
||||
return !!user && grantCount > 1;
|
||||
},
|
||||
|
||||
@observes('canLoadMore')
|
||||
_showFooter() {
|
||||
this.set("controllers.application.showFooter", !this.get("canLoadMore"));
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
{{/load-more}}
|
||||
|
||||
{{#unless canLoadMore}}
|
||||
{{#if user}}
|
||||
{{#if canShowOthers}}
|
||||
<div class='clearfix'>
|
||||
<a class='btn' href='{{model.url}}'>{{i18n 'badges.others_count' count=model.grant_count}}</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user