2015-03-10 15:01:15 -04:00
|
|
|
import showModal from 'discourse/lib/show-modal';
|
|
|
|
|
2014-11-11 15:48:13 -05:00
|
|
|
export default Discourse.Route.extend({
|
2015-03-10 15:01:15 -04:00
|
|
|
model(params) {
|
2014-11-11 15:48:13 -05:00
|
|
|
this.filter = params.filter;
|
|
|
|
return Discourse.FlaggedPost.findAll(params.filter);
|
|
|
|
},
|
|
|
|
|
2015-03-10 15:01:15 -04:00
|
|
|
setupController(controller, model) {
|
2014-11-11 15:48:13 -05:00
|
|
|
controller.set('model', model);
|
|
|
|
controller.set('query', this.filter);
|
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
2015-04-09 18:33:37 -04:00
|
|
|
showAgreeFlagModal(model) {
|
|
|
|
showModal('modals/admin-agree-flag', { model });
|
2014-11-11 15:48:13 -05:00
|
|
|
this.controllerFor('modal').set('modalClass', 'agree-flag-modal');
|
|
|
|
},
|
|
|
|
|
2015-04-09 18:33:37 -04:00
|
|
|
showDeleteFlagModal(model) {
|
|
|
|
showModal('modals/admin-delete-flag', { model });
|
2014-11-11 15:48:13 -05:00
|
|
|
this.controllerFor('modal').set('modalClass', 'delete-flag-modal');
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|