discourse/app/assets/javascripts/admin/routes/admin-flags-list.js.es6
Robin Ward 7f501a0c41 When a post returns enqueued don't insert it in the stream and notify
- Includes removal of a lot of modal boilerplate
2015-04-15 14:54:37 -04:00

27 lines
687 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(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');
}
}
});