diff --git a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 index 775aa1690..6426f7552 100644 --- a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 +++ b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 @@ -73,7 +73,7 @@ const controllerOpts = { }, dismissReadPosts() { - showModal('dismiss-read', { title: 'topics.bulk.dismiss' }); + showModal('dismiss-read', { title: 'topics.bulk.dismiss_read' }); } }, diff --git a/app/assets/javascripts/discourse/routes/discovery.js.es6 b/app/assets/javascripts/discourse/routes/discovery.js.es6 index c0f40e7a6..400d1df1e 100644 --- a/app/assets/javascripts/discourse/routes/discovery.js.es6 +++ b/app/assets/javascripts/discourse/routes/discovery.js.es6 @@ -48,6 +48,11 @@ export default Discourse.Route.extend(OpenComposer, { this.openComposer(this.controllerFor("discovery/topics")); }, + dismissReadTopics(dismissTopics) { + var operationType = dismissTopics ? "topics" : "posts"; + this.controllerFor("discovery/topics").send('dismissRead', operationType); + }, + dismissRead(operationType) { this.controllerFor("discovery/topics").send('dismissRead', operationType); } diff --git a/app/assets/javascripts/discourse/templates/modal/dismiss-read.hbs b/app/assets/javascripts/discourse/templates/modal/dismiss-read.hbs index 913697002..4213cfec4 100644 --- a/app/assets/javascripts/discourse/templates/modal/dismiss-read.hbs +++ b/app/assets/javascripts/discourse/templates/modal/dismiss-read.hbs @@ -1,10 +1,9 @@
- {{i18n 'topics.bulk.dismiss_body'}} + {{preference-checkbox labelKey="topics.bulk.also_dismiss_topics" checked=dismissTopics}}