FIX: delete spammer wasn't working in /admin/flags
This commit is contained in:
parent
dde2fbd391
commit
30eaa0e1c5
|
@ -7,5 +7,5 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<button title="{{i18n 'admin.flags.agree_flag_title'}}" {{action "agreeFlagKeepPost"}} class="btn"><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.agree_flag'}}</button>
|
<button title="{{i18n 'admin.flags.agree_flag_title'}}" {{action "agreeFlagKeepPost"}} class="btn"><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.agree_flag'}}</button>
|
||||||
{{#if model.canDeleteAsSpammer}}
|
{{#if model.canDeleteAsSpammer}}
|
||||||
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
|
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" model.user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<button title="{{i18n 'admin.flags.delete_post_defer_flag_title'}}" {{action "deletePostDeferFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-external-link"></i>{{i18n 'admin.flags.delete_post_defer_flag'}}</button>
|
<button title="{{i18n 'admin.flags.delete_post_defer_flag_title'}}" {{action "deletePostDeferFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-external-link"></i>{{i18n 'admin.flags.delete_post_defer_flag'}}</button>
|
||||||
<button title="{{i18n 'admin.flags.delete_post_agree_flag_title'}}" {{action "deletePostAgreeFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.delete_post_agree_flag'}}</button>
|
<button title="{{i18n 'admin.flags.delete_post_agree_flag_title'}}" {{action "deletePostAgreeFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.delete_post_agree_flag'}}</button>
|
||||||
{{#if model.canDeleteAsSpammer}}
|
{{#if model.canDeleteAsSpammer}}
|
||||||
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
|
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" model.user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -122,12 +122,10 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
||||||
this.fetchUserDetails();
|
this.fetchUserDetails();
|
||||||
}.observes('model.username'),
|
}.observes('model.username'),
|
||||||
|
|
||||||
fetchUserDetails: function() {
|
fetchUserDetails() {
|
||||||
if( Discourse.User.currentProp('staff') && this.get('model.username') ) {
|
if (Discourse.User.currentProp('staff') && this.get('model.username')) {
|
||||||
const flagController = this;
|
Discourse.AdminUser.find(this.get('model.username').toLowerCase())
|
||||||
Discourse.AdminUser.find(this.get('model.username').toLowerCase()).then(function(user){
|
.then(user => this.set('userDetails', user));
|
||||||
flagController.set('userDetails', user);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue