demarches-normaliennes/app/views/prefill_descriptions/_prefill_link.html.haml
Sébastien Carceles 0a10a08c21
feat(demarche): describe procedure prefilling (#8187)
* feat(demarche): description

Show the description of an opendata procedure (published or draft),
with help about how to prefill a dossier for this procedure.

Co-authored-by: Damien Le Thiec <damien.lethiec@gmail.com>
2022-12-19 11:32:09 +00:00

15 lines
926 B
Text

= turbo_frame_tag "#{dom_id(prefill_description)}_url" do
- theme = prefill_description.link_too_long? ? :warning : :success
- icon = prefill_description.link_too_long? ? "fr-icon-warning-fill" : "fr-icon-paint-fill"
- body = prefill_description.link_too_long? ? t("views.prefill_descriptions.edit.prefill_link_too_long") : t("views.prefill_descriptions.edit.prefill_link_info")
- if prefill_description.prefilled_champs.any?
= render Dsfr::CalloutComponent.new(title: t("views.prefill_descriptions.edit.prefill_link_title"), theme: theme, icon: icon) do |c|
- c.with_body do
= body
%pre
%code.code-block
= prefill_description.prefill_link
- unless prefill_description.link_too_long?
- c.with_bottom do
= render Dsfr::CopyButtonComponent.new(title: t("views.prefill_descriptions.edit.prefill_link_copy"), text: prefill_description.prefill_link)