From 54da4610249b01fa7757b9242b7a0e58d00f9a32 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sat, 31 Oct 2015 15:31:05 +1100 Subject: [PATCH] UX: simplify Dismiss menu --- .../discourse/controllers/discovery/topics.js.es6 | 2 +- app/assets/javascripts/discourse/routes/discovery.js.es6 | 5 +++++ .../javascripts/discourse/templates/modal/dismiss-read.hbs | 5 ++--- config/locales/client.en.yml | 5 ++--- 4 files changed, 10 insertions(+), 7 deletions(-) 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 @@ diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index c5b977dd1..f48dd255b 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1004,11 +1004,10 @@ en: reset_read: "Reset Read" delete: "Delete Topics" dismiss: "Dismiss" + dismiss_read: "Dismiss all unread" dismiss_button: "Dismiss…" dismiss_tooltip: "Dismiss just new posts or stop tracking topics" - dismiss_body: "Would you like to dismiss just the new posts in these topics, or dismiss the topics entirely?" - dismiss_posts: "Dismiss Just New Posts" - dismiss_topics: "Dismiss Topics" + also_dismiss_topics: "Stop tracking these topics? (Topics will no longer appear in the unread tab)" dismiss_new: "Dismiss New" toggle: "toggle bulk selection of topics" actions: "Bulk Actions"