diff --git a/app/assets/javascripts/discourse/components/topic-list.js.es6 b/app/assets/javascripts/discourse/components/topic-list.js.es6 index 260bddb756e..5b214be7aa7 100644 --- a/app/assets/javascripts/discourse/components/topic-list.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-list.js.es6 @@ -125,6 +125,14 @@ export default Ember.Component.extend({ this.rerender(); }); + onClick('button.bulk-select-all', function(){ + $('input.bulk-select:not(:checked)').click(); + }); + + onClick('button.bulk-clear-all', function(){ + $('input.bulk-select:checked').click(); + }); + onClick('th.sortable', function(e2){ this.sendAction('changeSort', e2.data('sort-order')); this.rerender(); diff --git a/app/assets/javascripts/discourse/templates/topic-list-header-column.raw.hbs b/app/assets/javascripts/discourse/templates/topic-list-header-column.raw.hbs index 3d3da42d96a..ab53f6f29cf 100644 --- a/app/assets/javascripts/discourse/templates/topic-list-header-column.raw.hbs +++ b/app/assets/javascripts/discourse/templates/topic-list-header-column.raw.hbs @@ -2,6 +2,12 @@ {{~#if showBulkToggle}} {{/if ~}} + {{~#if bulkSelectEnabled}} + + + + + {{/if ~}} {{view.localizedName}} {{~#if view.isSorting}} diff --git a/app/assets/javascripts/discourse/templates/topic-list-header.raw.hbs b/app/assets/javascripts/discourse/templates/topic-list-header.raw.hbs index 4714a3cedb7..e5d1f506d6d 100644 --- a/app/assets/javascripts/discourse/templates/topic-list-header.raw.hbs +++ b/app/assets/javascripts/discourse/templates/topic-list-header.raw.hbs @@ -1,9 +1,9 @@ {{#if bulkSelectEnabled}} - - - + + + {{/if}} -{{raw "topic-list-header-column" order='default' name='topic.title' showBulkToggle=toggleInTitle}} +{{raw "topic-list-header-column" order='default' name='topic.title' bulkSelectEnabled=bulkSelectEnabled showBulkToggle=toggleInTitle}} {{#unless hideCategory}} {{raw "topic-list-header-column" sortable=sortable order='category' name='category_title'}} {{/unless}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 82e8eaec5f2..a5d7578c29d 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1272,6 +1272,8 @@ en: topics: new_messages_marker: "last visit" bulk: + select_all: "Select All" + clear_all: "Clear All" unlist_topics: "Unlist Topics" reset_read: "Reset Read" delete: "Delete Topics"