FIX: Broken `{{if}}` statement

This commit is contained in:
Robin Ward 2016-11-01 16:56:45 -04:00
parent 29edbafac7
commit e9309f2d96
2 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,11 @@ export default Ember.Controller.extend(CanCheckEmails, {
return username === User.currentProp('username');
},
@computed('model.profileBackground')
hasProfileBackground(background) {
return !Ember.isEmpty(background.toString());
},
@computed('indexStream', 'viewingSelf', 'forceExpand')
collapsedInfo(indexStream, viewingSelf, forceExpand){
return (!indexStream || viewingSelf) && !forceExpand;

View File

@ -1,6 +1,7 @@
<div class="container{{if viewingSelf ' viewing-self'}}">
<section class='user-main'>
<section class="{{if collapsedInfo 'collapsed-info'}} about {{if model.profileBackground 'has-background' 'no-background'}}" style={{model.profileBackground}}>
<section class="{{if collapsedInfo 'collapsed-info'}} about {{if hasProfileBackground 'has-background' 'no-background'}}" style={{model.profileBackground}}>
{{#unless collapsedInfo}}
<div class='staff-counters'>
{{#if model.number_of_flags_given}}