display long description for badges

This commit is contained in:
Sam 2016-03-23 17:27:03 +11:00
parent 6dd6bbd509
commit 1b8010ed71
3 changed files with 13 additions and 7 deletions

View File

@ -61,8 +61,12 @@ export default Ember.Controller.extend({
this.set("controllers.application.showFooter", !this.get("canLoadMore"));
}.observes("canLoadMore"),
longDescription: function(){
return Discourse.Emoji.unescape(this.get('model.long_description'));
}.property('model.long_description'),
showLongDescription: function(){
return window.location.search.match("long-description");
return this.get('model.long_description');
}.property('userBadges')
});

View File

@ -5,6 +5,12 @@
{{model.displayName}}
</h1>
{{#if showLongDescription}}
<div class='long-description banner'>
{{{longDescription}}}
</div>
{{/if}}
<div class='badges-listing'>
<div class='row'>
<div class='badge'>{{user-badge badge=model}}</div>
@ -18,11 +24,6 @@
</div>
{{#if showLongDescription}}
<div class='long-description banner'>
{{{long_description}}}
</div>
{{/if}}
{{#if user}}
<div class='badge-user-info'>

View File

@ -241,5 +241,6 @@
.long-description.banner {
width: 88%;
margin-bottom: 20px;
margin-bottom: 15px;
margin-top: 15px;
}