mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: download user posts archive
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { outputExportResult } from 'admin/lib/export-result';
|
||||
import { outputExportResult } from 'discourse/lib/export-result';
|
||||
|
||||
export default Ember.ArrayController.extend(Discourse.Presence, {
|
||||
loading: false,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { outputExportResult } from 'admin/lib/export-result';
|
||||
import { outputExportResult } from 'discourse/lib/export-result';
|
||||
|
||||
export default Ember.ArrayController.extend(Discourse.Presence, {
|
||||
loading: false,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { outputExportResult } from 'admin/lib/export-result';
|
||||
import { outputExportResult } from 'discourse/lib/export-result';
|
||||
|
||||
export default Ember.ArrayController.extend(Discourse.Presence, {
|
||||
loading: false,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
import { outputExportResult } from 'admin/lib/export-result';
|
||||
import { outputExportResult } from 'discourse/lib/export-result';
|
||||
|
||||
export default Ember.ArrayController.extend(Discourse.Presence, {
|
||||
loading: false,
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
export function outputExportResult(result) {
|
||||
if (result.success) {
|
||||
bootbox.alert(I18n.t("admin.export_csv.success"));
|
||||
} else {
|
||||
bootbox.alert(I18n.t("admin.export_csv.failed"));
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/**
|
||||
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/export_entity.json", {data: {entity: 'user'}});
|
||||
},
|
||||
|
||||
/**
|
||||
Exports staff action logs
|
||||
|
||||
@method export_staff_action_logs
|
||||
**/
|
||||
exportStaffActionLogs: function() {
|
||||
return Discourse.ajax("/admin/export_csv/export_entity.json", {data: {entity: 'staff_action'}});
|
||||
},
|
||||
|
||||
/**
|
||||
Exports screened email list
|
||||
|
||||
@method export_screened_email_list
|
||||
**/
|
||||
exportScreenedEmailList: function() {
|
||||
return Discourse.ajax("/admin/export_csv/export_entity.json", {data: {entity: 'screened_email'}});
|
||||
},
|
||||
|
||||
/**
|
||||
Exports screened IP list
|
||||
|
||||
@method export_screened_ip_list
|
||||
**/
|
||||
exportScreenedIpList: function() {
|
||||
return Discourse.ajax("/admin/export_csv/export_entity.json", {data: {entity: 'screened_ip'}});
|
||||
},
|
||||
|
||||
/**
|
||||
Exports screened URL list
|
||||
|
||||
@method export_screened_url_list
|
||||
**/
|
||||
exportScreenedUrlList: function() {
|
||||
return Discourse.ajax("/admin/export_csv/export_entity.json", {data: {entity: 'screened_url'}});
|
||||
}
|
||||
});
|
||||
@@ -1,4 +1,4 @@
|
||||
import { outputExportResult } from 'admin/lib/export-result';
|
||||
import { outputExportResult } from 'discourse/lib/export-result';
|
||||
|
||||
export default Discourse.Route.extend({
|
||||
|
||||
|
||||
Reference in New Issue
Block a user