FEATURE: tag filter dropdown menu is scoped to user and category

This commit is contained in:
Neil Lalonde
2016-09-22 15:23:10 -04:00
parent 3d621767cc
commit e0be2f482e
8 changed files with 55 additions and 11 deletions

View File

@@ -67,9 +67,6 @@ export default (filter, params) => {
return findTopicList(this.store, this.topicTrackingState, listFilter, findOpts, extras).then(list => {
TopicList.hideUniformCategory(list, category);
this.set('topics', list);
if (list.topic_list.tags) {
Discourse.Site.currentProp('top_tags', list.topic_list.tags);
}
return list;
});
},

View File

@@ -54,6 +54,9 @@ function findTopicList(store, tracking, filter, filterParams, extras) {
tracking.trackIncoming(list.filter);
}
Discourse.Session.currentProp('topicList', list);
if (list.topic_list && list.topic_list.tags) {
Discourse.Site.currentProp('top_tags', list.topic_list.tags);
}
return list;
});
}

View File

@@ -75,9 +75,6 @@ export default Discourse.Route.extend({
return findTopicList(this.store, this.topicTrackingState, params.filter, params, {}).then(function(list) {
controller.set('list', list);
controller.set('canCreateTopic', list.get('can_create_topic'));
if (list.topic_list.tags) {
Discourse.Site.currentProp('top_tags', list.topic_list.tags);
}
controller.set('loading', false);
});
},