diff --git a/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml b/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml index 2770eac7e..ede49a733 100644 --- a/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml +++ b/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml @@ -8,7 +8,7 @@ = form_for @dossier, url: annotations_gestionnaire_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' } do |f| = f.fields_for :champs_private, f.object.ordered_champs_private do |champ_form| - champ = champ_form.object - = render partial: "new_gestionnaire/dossiers/editable_champs/editable_champ", + = render partial: "shared/dossiers/editable_champs/editable_champ", locals: { champ: champ, form: champ_form, seen_at: @annotations_privees_seen_at } .send-wrapper diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_editable_champ.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_editable_champ.html.haml deleted file mode 100644 index f0f526b47..000000000 --- a/app/views/new_gestionnaire/dossiers/editable_champs/_editable_champ.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -.editable-champ - - if is_not_header_nor_explication?(champ) - = render partial: 'new_gestionnaire/dossiers/editable_champs/champ_label', locals: { form: form, champ: champ, seen_at: defined?(seen_at) ? seen_at : nil } - - = render partial: "new_gestionnaire/dossiers/editable_champs/#{champ.type_champ}", - locals: { champ: champ, form: form } diff --git a/app/views/new_user/dossiers/modifier.html.haml b/app/views/new_user/dossiers/modifier.html.haml index 907d67a43..c409b495d 100644 --- a/app/views/new_user/dossiers/modifier.html.haml +++ b/app/views/new_user/dossiers/modifier.html.haml @@ -9,7 +9,7 @@ = form_for @dossier, html: { class: 'form', multipart: true } do |f| = f.fields_for :champs, @dossier.ordered_champs_v2 do |champ_form| - champ = champ_form.object - = render partial: "new_gestionnaire/dossiers/editable_champs/editable_champ", + = render partial: "shared/dossiers/editable_champs/editable_champ", locals: { champ: champ, form: champ_form } - tpjs = @dossier.types_de_piece_justificative.order('order_place ASC') diff --git a/app/views/root/patron.html.haml b/app/views/root/patron.html.haml index cd02bc74b..0bf202cb3 100644 --- a/app/views/root/patron.html.haml +++ b/app/views/root/patron.html.haml @@ -23,7 +23,7 @@ = form_for @dossier, url: '', html: { class: 'form' } do |f| = f.fields_for :champs do |champ_form| - champ = champ_form.object - = render partial: "new_gestionnaire/dossiers/editable_champs/editable_champ", + = render partial: "shared/dossiers/editable_champs/editable_champ", locals: { champ: champ, form: champ_form, seen_at: nil } %input{ type: "password", value: "12345678" } diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_address.html.haml b/app/views/shared/dossiers/editable_champs/_address.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_address.html.haml rename to app/views/shared/dossiers/editable_champs/_address.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_champ_label.html.haml b/app/views/shared/dossiers/editable_champs/_champ_label.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_champ_label.html.haml rename to app/views/shared/dossiers/editable_champs/_champ_label.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_checkbox.html.haml b/app/views/shared/dossiers/editable_champs/_checkbox.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_checkbox.html.haml rename to app/views/shared/dossiers/editable_champs/_checkbox.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_civilite.html.haml b/app/views/shared/dossiers/editable_champs/_civilite.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_civilite.html.haml rename to app/views/shared/dossiers/editable_champs/_civilite.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_date.html.haml b/app/views/shared/dossiers/editable_champs/_date.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_date.html.haml rename to app/views/shared/dossiers/editable_champs/_date.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_datetime.html.haml b/app/views/shared/dossiers/editable_champs/_datetime.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_datetime.html.haml rename to app/views/shared/dossiers/editable_champs/_datetime.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_departements.html.haml b/app/views/shared/dossiers/editable_champs/_departements.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_departements.html.haml rename to app/views/shared/dossiers/editable_champs/_departements.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_dossier_link.html.haml b/app/views/shared/dossiers/editable_champs/_dossier_link.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_dossier_link.html.haml rename to app/views/shared/dossiers/editable_champs/_dossier_link.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_drop_down_list.html.haml b/app/views/shared/dossiers/editable_champs/_drop_down_list.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_drop_down_list.html.haml rename to app/views/shared/dossiers/editable_champs/_drop_down_list.html.haml diff --git a/app/views/shared/dossiers/editable_champs/_editable_champ.html.haml b/app/views/shared/dossiers/editable_champs/_editable_champ.html.haml new file mode 100644 index 000000000..170ef3ef8 --- /dev/null +++ b/app/views/shared/dossiers/editable_champs/_editable_champ.html.haml @@ -0,0 +1,6 @@ +.editable-champ + - if is_not_header_nor_explication?(champ) + = render partial: 'shared/dossiers/editable_champs/champ_label', locals: { form: form, champ: champ, seen_at: defined?(seen_at) ? seen_at : nil } + + = render partial: "shared/dossiers/editable_champs/#{champ.type_champ}", + locals: { champ: champ, form: form } diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_email.html.haml b/app/views/shared/dossiers/editable_champs/_email.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_email.html.haml rename to app/views/shared/dossiers/editable_champs/_email.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_engagement.html.haml b/app/views/shared/dossiers/editable_champs/_engagement.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_engagement.html.haml rename to app/views/shared/dossiers/editable_champs/_engagement.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_explication.html.haml b/app/views/shared/dossiers/editable_champs/_explication.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_explication.html.haml rename to app/views/shared/dossiers/editable_champs/_explication.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_header_section.html.haml b/app/views/shared/dossiers/editable_champs/_header_section.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_header_section.html.haml rename to app/views/shared/dossiers/editable_champs/_header_section.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_multiple_drop_down_list.html.haml b/app/views/shared/dossiers/editable_champs/_multiple_drop_down_list.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_multiple_drop_down_list.html.haml rename to app/views/shared/dossiers/editable_champs/_multiple_drop_down_list.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_number.html.haml b/app/views/shared/dossiers/editable_champs/_number.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_number.html.haml rename to app/views/shared/dossiers/editable_champs/_number.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_pays.html.haml b/app/views/shared/dossiers/editable_champs/_pays.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_pays.html.haml rename to app/views/shared/dossiers/editable_champs/_pays.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_phone.html.haml b/app/views/shared/dossiers/editable_champs/_phone.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_phone.html.haml rename to app/views/shared/dossiers/editable_champs/_phone.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_piece_justificative.html.haml b/app/views/shared/dossiers/editable_champs/_piece_justificative.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_piece_justificative.html.haml rename to app/views/shared/dossiers/editable_champs/_piece_justificative.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_regions.html.haml b/app/views/shared/dossiers/editable_champs/_regions.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_regions.html.haml rename to app/views/shared/dossiers/editable_champs/_regions.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_text.html.haml b/app/views/shared/dossiers/editable_champs/_text.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_text.html.haml rename to app/views/shared/dossiers/editable_champs/_text.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_textarea.html.haml b/app/views/shared/dossiers/editable_champs/_textarea.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_textarea.html.haml rename to app/views/shared/dossiers/editable_champs/_textarea.html.haml diff --git a/app/views/new_gestionnaire/dossiers/editable_champs/_yes_no.html.haml b/app/views/shared/dossiers/editable_champs/_yes_no.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/editable_champs/_yes_no.html.haml rename to app/views/shared/dossiers/editable_champs/_yes_no.html.haml