docbrown/app/views/admin/users/_data_export.html.erb
rhymes 68b320a1de
Add contact email to SiteConfig and replace default where appropriate (#11630)
* Add a new contact email to use in place of default

* Replace :default with :contact email in all non transactional emails

* Add missing expectation
2020-11-27 16:39:38 +01:00

23 lines
1.3 KiB
Text

<div class="crayons-card p-6">
<div>
<h2 class="d-inline">Data Export</h2>
<button type="button" data-toggle="collapse" data-target="#data-export-row" class="crayons-btn float-right">Toggle</button>
</div>
<div class="crayons-card__body collapse" id="data-export-row">
<p>
You can export a user's data here. Currently we only support exporting a user's posts and comments.
</p>
<p>
You have the option of exporting to your admin account to send to the user, or exporting to the user directly.
</p>
<p>
Exporting the data to your admin account will send it to your contact
admin email (<%= SiteConfig.email_addresses[:contact] %>),
and exporting to the user will send it to their email (<%= @user.email %>).
</p>
<div style="display: flex;">
<%= button_to "Export to Admin", export_data_admin_user_path(@user.id), data: { confirm: "Are you sure you want to export this user's content to the ADMIN?" }, class: "crayons-btn", params: { send_to_admin: true }, style: "margin-right: 8px;" %>
<%= button_to "Export to User", export_data_admin_user_path(@user.id), data: { confirm: "Are you sure you want to export this user's content to the USER?" }, class: "crayons-btn", params: { send_to_admin: false } %>
</div>
</div>
</div>