mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
28 lines
742 B
JavaScript
28 lines
742 B
JavaScript
import showModal from 'discourse/lib/show-modal';
|
|
import FlaggedPost from 'admin/models/flagged-post';
|
|
|
|
export default Discourse.Route.extend({
|
|
model(params) {
|
|
this.filter = params.filter;
|
|
return FlaggedPost.findAll(params.filter);
|
|
},
|
|
|
|
setupController(controller, model) {
|
|
controller.set('model', model);
|
|
controller.set('query', this.filter);
|
|
},
|
|
|
|
actions: {
|
|
showAgreeFlagModal(model) {
|
|
showModal('admin-agree-flag', { model, admin: true });
|
|
this.controllerFor('modal').set('modalClass', 'agree-flag-modal');
|
|
},
|
|
|
|
showDeleteFlagModal(model) {
|
|
showModal('admin-delete-flag', { model, admin: true });
|
|
this.controllerFor('modal').set('modalClass', 'delete-flag-modal');
|
|
}
|
|
|
|
}
|
|
});
|