refactor: extract preview
This commit is contained in:
parent
c8b3b4b45a
commit
2dffa9aaa2
2 changed files with 18 additions and 17 deletions
|
@ -72,20 +72,4 @@
|
|||
- sample_dossier = @procedure.dossier_for_preview(current_instructeur)
|
||||
- if sample_dossier
|
||||
.fr-col-12.fr-col-md-4.fr-background-alt--blue-france
|
||||
.export-template-preview.fr-p-2w.sticky--top
|
||||
%h2.fr-h4 Aperçu
|
||||
%ul.tree.fr-text--sm
|
||||
%li= DownloadableFileService::EXPORT_DIRNAME
|
||||
%li
|
||||
%ul
|
||||
%li
|
||||
%span#preview_default_dossier_directory= @export_template.tiptap_convert(sample_dossier, "default_dossier_directory")
|
||||
%ul
|
||||
%li#preview_pdf_name= @export_template.tiptap_convert(sample_dossier, "pdf_name")
|
||||
- @procedure.exportables_pieces_jointes.each do |pj|
|
||||
%li{ id: "preview_pj_#{pj.stable_id}" }= @export_template.tiptap_convert_pj(sample_dossier, pj.stable_id)
|
||||
%ul
|
||||
%li
|
||||
%span messagerie
|
||||
%ul
|
||||
%li un-autre-fichier
|
||||
= render partial: 'preview', locals: { dossier: sample_dossier, export_template: @export_template, procedure: @procedure }
|
||||
|
|
17
app/views/instructeurs/export_templates/_preview.html.haml
Normal file
17
app/views/instructeurs/export_templates/_preview.html.haml
Normal file
|
@ -0,0 +1,17 @@
|
|||
#preview.export-template-preview.fr-p-2w.sticky--top
|
||||
%h2.fr-h4 Aperçu
|
||||
%ul.tree.fr-text--sm
|
||||
%li= DownloadableFileService::EXPORT_DIRNAME
|
||||
%li
|
||||
%ul
|
||||
%li
|
||||
%span#preview_default_dossier_directory= export_template.tiptap_convert(dossier, "default_dossier_directory")
|
||||
%ul
|
||||
%li#preview_pdf_name= export_template.tiptap_convert(dossier, "pdf_name")
|
||||
- procedure.exportables_pieces_jointes.each do |pj|
|
||||
%li{ id: "preview_pj_#{pj.stable_id}" }= export_template.tiptap_convert_pj(dossier, pj.stable_id)
|
||||
%ul
|
||||
%li
|
||||
%span messagerie
|
||||
%ul
|
||||
%li un-autre-fichier
|
Loading…
Reference in a new issue