mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-21 04:52:54 -05:00
5c899c765b
This reverts commit c21457d6a7
.
27 lines
730 B
JavaScript
27 lines
730 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('modals/admin-agree-flag', { model });
|
|
this.controllerFor('modal').set('modalClass', 'agree-flag-modal');
|
|
},
|
|
|
|
showDeleteFlagModal(model) {
|
|
showModal('modals/admin-delete-flag', { model });
|
|
this.controllerFor('modal').set('modalClass', 'delete-flag-modal');
|
|
}
|
|
|
|
}
|
|
});
|