discourse/app/assets/javascripts/admin/controllers/modals/admin-moderation-history.js.es6
Robin Ward 410994b7f5 FEATURE: Show a button to Staff for "Moderation History" on posts/topics
When clicked, it pops up a modal showing a history of moderation actions
taken on the post or topic.
2017-12-05 15:20:20 -05:00

19 lines
459 B
JavaScript

import ModalFunctionality from 'discourse/mixins/modal-functionality';
export default Ember.Controller.extend(ModalFunctionality, {
loading: null,
historyTarget: null,
history: null,
onShow() {
this.set('loading', true);
this.set('history', null);
},
loadHistory(target) {
this.store.findAll('moderation-history', target).then(result => {
this.set('history', result);
}).finally(() => this.set('loading', false));
}
});