Fix deprecations on SiteMap
This commit is contained in:
parent
c6d99bd141
commit
df3c19705f
|
@ -1,10 +1,10 @@
|
||||||
export default Ember.ObjectController.extend({
|
export default Ember.Controller.extend({
|
||||||
needs: ['site-map'],
|
needs: ['site-map'],
|
||||||
|
|
||||||
unreadTotal: function() {
|
unreadTotal: function() {
|
||||||
return parseInt(this.get('unreadTopics'), 10) +
|
return parseInt(this.get('model.unreadTopics'), 10) +
|
||||||
parseInt(this.get('newTopics'), 10);
|
parseInt(this.get('model.newTopics'), 10);
|
||||||
}.property('unreadTopics', 'newTopics'),
|
}.property('model.unreadTopics', 'model.newTopics'),
|
||||||
|
|
||||||
showTopicCount: Em.computed.not('currentUser')
|
showTopicCount: Em.computed.not('currentUser')
|
||||||
});
|
});
|
||||||
|
|
|
@ -65,14 +65,14 @@
|
||||||
|
|
||||||
{{#each c in categories itemController='site-map-category'}}
|
{{#each c in categories itemController='site-map-category'}}
|
||||||
<li class="category">
|
<li class="category">
|
||||||
{{category-link c allowUncategorized="true"}}
|
{{category-link c.model allowUncategorized="true"}}
|
||||||
|
|
||||||
{{#if c.unreadTotal}}
|
{{#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}}
|
||||||
|
|
||||||
{{#if c.showTopicCount}}
|
{{#if c.showTopicCount}}
|
||||||
<b class="topics-count">{{unbound c.topic_count}}</b>
|
<b class="topics-count">{{unbound c.model.topic_count}}</b>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
Loading…
Reference in New Issue