FIX: download my post button was broken

This commit is contained in:
Sam Saffron 2016-01-13 14:37:58 +11:00
parent 70c8ce2f23
commit f5c2ce8141
2 changed files with 18 additions and 14 deletions

View File

@ -1,3 +1,5 @@
import { exportUserArchive } from 'discourse/lib/export-csv';
export default Ember.Controller.extend({
userActionType: null,
needs: ["application", "user"],
@ -14,6 +16,21 @@ export default Ember.Controller.extend({
showFooter = this.get("model.statsCountNonPM") <= this.get("model.stream.itemsLoaded");
}
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();
}
}
);
}
}
});

View File

@ -1,4 +1,3 @@
import { exportUserArchive } from 'discourse/lib/export-csv';
import CanCheckEmails from 'discourse/mixins/can-check-emails';
import computed from 'ember-addons/ember-computed-decorators';
import UserAction from 'discourse/models/user-action';
@ -89,17 +88,5 @@ export default Ember.Controller.extend(CanCheckEmails, {
.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();
}
}
);
}
}
});