mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
410994b7f5
When clicked, it pops up a modal showing a history of moderation actions taken on the post or topic.
19 lines
459 B
JavaScript
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));
|
|
}
|
|
});
|