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.
This commit is contained in:
Robin Ward
2017-12-04 12:14:43 -05:00
parent 85a59c632d
commit 410994b7f5
20 changed files with 244 additions and 7 deletions

View File

@@ -0,0 +1,18 @@
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));
}
});