Merge pull request #2655 from techAPJ/patch-3

FEATURE: export user list
This commit is contained in:
Robin Ward
2014-08-14 17:19:49 -04:00
12 changed files with 232 additions and 1 deletions
@@ -0,0 +1,26 @@
/**
Data model for representing an export
@class ExportCsv
@extends Discourse.Model
@namespace Discourse
@module Discourse
**/
Discourse.ExportCsv = Discourse.Model.extend({});
Discourse.ExportCsv.reopenClass({
/**
Exports user list
@method export_user_list
**/
exportUserList: function() {
return Discourse.ajax("/admin/export_csv/users.json").then(function(result) {
if (result.success) {
bootbox.alert(I18n.t("admin.export_csv.success"));
} else {
bootbox.alert(I18n.t("admin.export_csv.failed"));
}
});
}
});