Retrospring/app/views/settings/_export.haml

21 lines
714 B
Plaintext
Raw Normal View History

2020-04-25 08:04:23 -07:00
.card
.card-body
2022-02-12 17:26:15 -08:00
%h2= t(".heading")
= t(".body_html")
2020-04-25 08:04:23 -07:00
- if current_user.can_export?
2020-05-10 13:27:39 -07:00
%form{ action: begin_user_export_path, method: :post }
2020-04-26 16:31:43 -07:00
%p.text-center
2022-02-12 17:26:15 -08:00
%button.btn.btn-lg.btn-primary#export-btn{ type: :submit }= t(".export")
2020-04-25 08:04:23 -07:00
= hidden_field_tag :authenticity_token, form_authenticity_token
- else
2020-04-26 16:31:43 -07:00
%p.text-center
2022-02-12 17:26:15 -08:00
%button.btn.btn-lg.btn-primary.disabled{ disabled: :disabled }= t(".export")
2020-04-25 08:04:23 -07:00
%p
- if current_user.export_url.nil?
2022-02-12 17:26:15 -08:00
= t(".export_url.none")
2020-04-25 08:04:23 -07:00
- else
2022-02-12 17:26:15 -08:00
= t(".export_url.present", time: current_user.export_created_at)
2020-05-10 01:40:48 -07:00
%a{ href: current_user.export_url }
= File.basename current_user.export_url