UX: simplify Dismiss menu

This commit is contained in:
Sam Saffron 2015-10-31 15:31:05 +11:00
parent 5c0fb34eee
commit 54da461024
4 changed files with 10 additions and 7 deletions

View file

@ -73,7 +73,7 @@ const controllerOpts = {
},
dismissReadPosts() {
showModal('dismiss-read', { title: 'topics.bulk.dismiss' });
showModal('dismiss-read', { title: 'topics.bulk.dismiss_read' });
}
},

View file

@ -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);
}

View file

@ -1,10 +1,9 @@
<div class="modal-body">
<p>
{{i18n 'topics.bulk.dismiss_body'}}
{{preference-checkbox labelKey="topics.bulk.also_dismiss_topics" checked=dismissTopics}}
</p>
</div>
<div class="modal-footer">
<button class='btn btn-primary' {{action "dismissRead" "posts"}}>{{i18n 'topics.bulk.dismiss_posts'}}</button>
<button class='btn btn-primary' {{action "dismissRead" "topics"}}>{{i18n 'topics.bulk.dismiss_topics'}}</button>
<button class='btn btn-primary' {{action "dismissReadTopics" dismissTopics}}>{{i18n 'topics.bulk.dismiss'}}</button>
</div>

View file

@ -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"