FEATURE: clean up badges admin
This commit is contained in:
parent
ebf385aedc
commit
5c72297695
|
@ -6,7 +6,10 @@
|
|||
{{#each}}
|
||||
<li>
|
||||
<a {{action selectBadge this}} {{bind-attr class="selected:active"}}>
|
||||
<span {{bind-attr class=":user-badge badgeTypeClassName" data-badge-name="name" title="displayDescription"}}>
|
||||
<i {{bind-attr class=":fa icon"}}></i>
|
||||
{{displayName}}
|
||||
</span>
|
||||
{{#if newBadge}}
|
||||
<span class="list-badge">{{i18n filters.new.lower_title}}</span>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
export default Ember.Component.extend({
|
||||
tagName: 'span',
|
||||
|
||||
badgeTypeClassName: function() {
|
||||
return "badge-type-" + this.get('badge.badge_type.name').toLowerCase();
|
||||
}.property('badge.badge_type.name'),
|
||||
|
||||
showGrantCount: function() {
|
||||
return this.get('count') && this.get('count') > 1;
|
||||
}.property('count'),
|
||||
|
|
|
@ -99,6 +99,10 @@ Discourse.Badge = Discourse.Model.extend({
|
|||
}
|
||||
},
|
||||
|
||||
badgeTypeClassName: function() {
|
||||
return "badge-type-" + this.get('badge_type.name').toLowerCase();
|
||||
}.property('badge_type.name'),
|
||||
|
||||
/**
|
||||
Save and update the badge from the server's response.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#link-to 'badges.show' badge}}
|
||||
<span {{bind-attr class=":user-badge badgeTypeClassName" data-badge-name="badge.name" title="badge.displayDescription"}}>
|
||||
<span {{bind-attr class=":user-badge badge.badgeTypeClassName" data-badge-name="badge.name" title="badge.displayDescription"}}>
|
||||
{{#if isIcon}}
|
||||
<i {{bind-attr class=":fa badge.icon"}}></i>
|
||||
{{else}}
|
||||
|
|
Loading…
Reference in New Issue