mirror of
https://github.com/discourse/discourse.git
synced 2025-02-10 05:14:59 +00:00
This makes it easier to share bulk topic operations, for example from a plugin's custom topic list.
27 lines
689 B
JavaScript
27 lines
689 B
JavaScript
import showModal from 'discourse/lib/show-modal';
|
|
|
|
export default Discourse.Route.extend({
|
|
model(params) {
|
|
this.filter = params.filter;
|
|
return Discourse.FlaggedPost.findAll(params.filter);
|
|
},
|
|
|
|
setupController(controller, model) {
|
|
controller.set('model', model);
|
|
controller.set('query', this.filter);
|
|
},
|
|
|
|
actions: {
|
|
showAgreeFlagModal(flaggedPost) {
|
|
showModal('admin_agree_flag', flaggedPost);
|
|
this.controllerFor('modal').set('modalClass', 'agree-flag-modal');
|
|
},
|
|
|
|
showDeleteFlagModal(flaggedPost) {
|
|
showModal('admin_delete_flag', flaggedPost);
|
|
this.controllerFor('modal').set('modalClass', 'delete-flag-modal');
|
|
}
|
|
|
|
}
|
|
});
|