FIX: If you have a badge, filter to you when clicking on it
This commit is contained in:
parent
c8044c6956
commit
b705634ee1
|
@ -5,6 +5,11 @@ export default Ember.Component.extend({
|
||||||
size: 'medium',
|
size: 'medium',
|
||||||
classNameBindings: [':badge-card', 'size', 'badge.slug'],
|
classNameBindings: [':badge-card', 'size', 'badge.slug'],
|
||||||
|
|
||||||
|
@computed('badge.url', 'badge.has_badge')
|
||||||
|
url(url, hasBadge) {
|
||||||
|
return hasBadge ? `${url}?username=${this.currentUser.get('username_lower')}` : url;
|
||||||
|
},
|
||||||
|
|
||||||
@computed('count', 'badge.grant_count')
|
@computed('count', 'badge.grant_count')
|
||||||
displayCount(count, grantCount) {
|
displayCount(count, grantCount) {
|
||||||
if (count == null) { return grantCount; }
|
if (count == null) { return grantCount; }
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class='badge-info'>
|
<div class='badge-info'>
|
||||||
<div class='badge-info-item'>
|
<div class='badge-info-item'>
|
||||||
<h3><a href={{badge.url}}>{{badge.name}}</a></h3>
|
<h3><a href={{url}}>{{badge.name}}</a></h3>
|
||||||
<div class='badge-summary'>{{{summary}}}</div>
|
<div class='badge-summary'>{{{summary}}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue