docbrown/app/views/admin/users/_data_export.html.erb
Ridhwana 5e93d3a25e
Add a contact email address to the /admin/customization/config (#16497)
* feat: remove the default email and cobine the periodic digest and the contact email under the Email section

* refactor: rename  the email_link to contact link and use the contact_email as a default and fallback to the ForemInstance.email

* chore: alignment

* feat: use the contact_email helper

* feat: move the contact_email to the ForemInstance model

* feat: use ForemInstance.contact_email instead of the application helper method

* removed the application Helper

* feat: set the dafault on the contact_email

* fix: cypress tests

* Update app/lib/constants/settings/general.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-15 17:37:08 +02: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 (<%= ForemInstance.contact_email %>),
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>