mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-29 18:46:23 -05:00
25 lines
724 B
Text
25 lines
724 B
Text
|
export default Discourse.Route.extend({
|
||
|
model: function(params) {
|
||
|
this.filter = params.filter;
|
||
|
return Discourse.FlaggedPost.findAll(params.filter);
|
||
|
},
|
||
|
|
||
|
setupController: function(controller, model) {
|
||
|
controller.set('model', model);
|
||
|
controller.set('query', this.filter);
|
||
|
},
|
||
|
|
||
|
actions: {
|
||
|
showAgreeFlagModal: function (flaggedPost) {
|
||
|
Discourse.Route.showModal(this, 'admin_agree_flag', flaggedPost);
|
||
|
this.controllerFor('modal').set('modalClass', 'agree-flag-modal');
|
||
|
},
|
||
|
|
||
|
showDeleteFlagModal: function (flaggedPost) {
|
||
|
Discourse.Route.showModal(this, 'admin_delete_flag', flaggedPost);
|
||
|
this.controllerFor('modal').set('modalClass', 'delete-flag-modal');
|
||
|
}
|
||
|
|
||
|
}
|
||
|
});
|