Merge pull request #4304 from Mittineague/add-badge-slug-to-class

Add badge slug to class
This commit is contained in:
Sam 2016-07-04 18:01:44 +10:00 committed by GitHub
commit 1ad3340325
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import DiscourseURL from 'discourse/lib/url';
export default Ember.Component.extend({
size: 'medium',
classNameBindings: [':badge-card', 'size', 'navigateOnClick:hyperlink'],
classNameBindings: [':badge-card', 'size', 'badge.slug', 'navigateOnClick:hyperlink'],
click(e){
if (e.target && e.target.nodeName === "A") {

View File

@ -1,4 +1,4 @@
<div class='container show-badge'>
<div class='container show-badge {{model.slug}}'>
<h1>
{{#link-to 'badges.index'}}{{i18n 'badges.title'}}{{/link-to}}
/
@ -20,7 +20,7 @@
</div>
{{#if userBadges}}
<div class="user-badges">
<div class="user-badges {{model.slug}}">
{{#load-more selector=".badge-info" action="loadMore"}}
{{#each userBadges as |ub|}}
{{#user-info user=ub.user size="medium" class="badge-info" date=ub.granted_at}}