FIX: download my post button was broken
This commit is contained in:
parent
70c8ce2f23
commit
f5c2ce8141
|
@ -1,3 +1,5 @@
|
||||||
|
import { exportUserArchive } from 'discourse/lib/export-csv';
|
||||||
|
|
||||||
export default Ember.Controller.extend({
|
export default Ember.Controller.extend({
|
||||||
userActionType: null,
|
userActionType: null,
|
||||||
needs: ["application", "user"],
|
needs: ["application", "user"],
|
||||||
|
@ -14,6 +16,21 @@ export default Ember.Controller.extend({
|
||||||
showFooter = this.get("model.statsCountNonPM") <= this.get("model.stream.itemsLoaded");
|
showFooter = this.get("model.statsCountNonPM") <= this.get("model.stream.itemsLoaded");
|
||||||
}
|
}
|
||||||
this.set("controllers.application.showFooter", showFooter);
|
this.set("controllers.application.showFooter", showFooter);
|
||||||
}.observes("userActionType", "model.stream.itemsLoaded")
|
}.observes("userActionType", "model.stream.itemsLoaded"),
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
exportUserArchive() {
|
||||||
|
bootbox.confirm(
|
||||||
|
I18n.t("admin.export_csv.user_archive_confirm"),
|
||||||
|
I18n.t("no_value"),
|
||||||
|
I18n.t("yes_value"),
|
||||||
|
function(confirmed) {
|
||||||
|
if (confirmed) {
|
||||||
|
exportUserArchive();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { exportUserArchive } from 'discourse/lib/export-csv';
|
|
||||||
import CanCheckEmails from 'discourse/mixins/can-check-emails';
|
import CanCheckEmails from 'discourse/mixins/can-check-emails';
|
||||||
import computed from 'ember-addons/ember-computed-decorators';
|
import computed from 'ember-addons/ember-computed-decorators';
|
||||||
import UserAction from 'discourse/models/user-action';
|
import UserAction from 'discourse/models/user-action';
|
||||||
|
@ -89,17 +88,5 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
||||||
.then(user => user.destroy({deletePosts: true}));
|
.then(user => user.destroy({deletePosts: true}));
|
||||||
},
|
},
|
||||||
|
|
||||||
exportUserArchive() {
|
|
||||||
bootbox.confirm(
|
|
||||||
I18n.t("admin.export_csv.user_archive_confirm"),
|
|
||||||
I18n.t("no_value"),
|
|
||||||
I18n.t("yes_value"),
|
|
||||||
function(confirmed) {
|
|
||||||
if (confirmed) {
|
|
||||||
exportUserArchive();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue