FEATURE: export user list

This commit is contained in:
Arpit Jalan
2014-08-09 15:58:57 +05:30
parent 2850ce46b8
commit d0736a06b6
11 changed files with 222 additions and 1 deletions

View File

@@ -1603,6 +1603,13 @@ en:
title: "Rollback the database to previous working state"
confirm: "Are your sure you want to rollback the database to the previous working state?"
export_csv:
users:
text: "Export Users"
title: "Export user list in a CSV file."
success: "Export has been initiated, you will be notified shortly with progress."
failed: "Export failed. Please check the logs."
customize:
title: "Customize"
long_title: "Site Customizations"

View File

@@ -1387,6 +1387,17 @@ en:
%{logs}
```
csv_export_succeeded:
subject_template: "Data Export completed successfully"
text_body_template: |
The data export was successful.
Download CSV file: <a class="attachment" href="%{download_link}">%{file_name}</a>
csv_export_failed:
subject_template: "Export failed"
text_body_template: "The export has failed. Please check the logs."
email_reject_trust_level:
subject_template: "Email issue -- Insufficient Trust Level"
text_body_template: |

View File

@@ -145,6 +145,15 @@ Discourse::Application.routes.draw do
end
end
resources :export_csv, constraints: AdminConstraint.new do
member do
get "download" => "export_csv#download", constraints: { id: /[^\/]+/ }
end
collection do
get "users" => "export_csv#export_user_list"
end
end
resources :badges, constraints: AdminConstraint.new do
collection do
get "types" => "badges#badge_types"