Fix deprecations on SiteMap

This commit is contained in:
Robin Ward 2015-05-04 14:29:04 -04:00
parent c6d99bd141
commit df3c19705f
2 changed files with 7 additions and 7 deletions

View File

@ -1,10 +1,10 @@
export default Ember.ObjectController.extend({
export default Ember.Controller.extend({
needs: ['site-map'],
unreadTotal: function() {
return parseInt(this.get('unreadTopics'), 10) +
parseInt(this.get('newTopics'), 10);
}.property('unreadTopics', 'newTopics'),
return parseInt(this.get('model.unreadTopics'), 10) +
parseInt(this.get('model.newTopics'), 10);
}.property('model.unreadTopics', 'model.newTopics'),
showTopicCount: Em.computed.not('currentUser')
});

View File

@ -65,14 +65,14 @@
{{#each c in categories itemController='site-map-category'}}
<li class="category">
{{category-link c allowUncategorized="true"}}
{{category-link c.model allowUncategorized="true"}}
{{#if c.unreadTotal}}
<a href={{unbound c.url}} class='badge badge-notification'>{{c.unreadTotal}}</a>
<a href={{unbound c.model.url}} class='badge badge-notification'>{{c.unreadTotal}}</a>
{{/if}}
{{#if c.showTopicCount}}
<b class="topics-count">{{unbound c.topic_count}}</b>
<b class="topics-count">{{unbound c.model.topic_count}}</b>
{{/if}}
</li>
{{/each}}