mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 08:15:48 +08:00
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'],
|
||||
|
||||
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')
|
||||
});
|
||||
|
|
|
@ -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}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user