From be1ce69f4749df56886a2de7b60ea62aecfcfc17 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Fri, 15 Dec 2017 14:54:07 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Improve=20a=20partial=E2=80=99s=20and=20a?= =?UTF-8?q?=20partials=20folder's=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../new_gestionnaire/dossiers/annotations_privees.html.haml | 2 +- .../dossiers/{champs => editable_champs}/_address.html.haml | 0 .../dossiers/{champs => editable_champs}/_champ_label.html.haml | 0 .../dossiers/{champs => editable_champs}/_checkbox.html.haml | 0 .../dossiers/{champs => editable_champs}/_civilite.html.haml | 0 .../dossiers/{champs => editable_champs}/_date.html.haml | 0 .../dossiers/{champs => editable_champs}/_datetime.html.haml | 0 .../{champs => editable_champs}/_departements.html.haml | 0 .../{champs => editable_champs}/_dossier_link.html.haml | 0 .../{champs => editable_champs}/_drop_down_list.html.haml | 0 .../_editable_champ.html.haml} | 0 .../dossiers/{champs => editable_champs}/_email.html.haml | 0 .../dossiers/{champs => editable_champs}/_engagement.html.haml | 0 .../dossiers/{champs => editable_champs}/_explication.html.haml | 0 .../{champs => editable_champs}/_header_section.html.haml | 0 .../_multiple_drop_down_list.html.haml | 0 .../dossiers/{champs => editable_champs}/_number.html.haml | 0 .../dossiers/{champs => editable_champs}/_pays.html.haml | 0 .../dossiers/{champs => editable_champs}/_phone.html.haml | 0 .../dossiers/{champs => editable_champs}/_regions.html.haml | 0 .../dossiers/{champs => editable_champs}/_text.html.haml | 0 .../dossiers/{champs => editable_champs}/_textarea.html.haml | 0 .../dossiers/{champs => editable_champs}/_yes_no.html.haml | 0 23 files changed, 1 insertion(+), 1 deletion(-) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_address.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_champ_label.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_checkbox.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_civilite.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_date.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_datetime.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_departements.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_dossier_link.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_drop_down_list.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs/_champ.html.haml => editable_champs/_editable_champ.html.haml} (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_email.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_engagement.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_explication.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_header_section.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_multiple_drop_down_list.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_number.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_pays.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_phone.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_regions.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_text.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_textarea.html.haml (100%) rename app/views/new_gestionnaire/dossiers/{champs => editable_champs}/_yes_no.html.haml (100%) diff --git a/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml b/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml index ca03bebd9..56e44d905 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_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/champs/champ", + = render partial: "new_gestionnaire/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/champs/_address.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_address.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_address.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_address.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_champ_label.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_champ_label.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_champ_label.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_champ_label.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_checkbox.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_checkbox.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_checkbox.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_checkbox.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_civilite.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_civilite.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_civilite.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_civilite.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_date.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_date.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_date.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_date.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_datetime.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_datetime.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_datetime.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_datetime.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_departements.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_departements.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_departements.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_departements.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_dossier_link.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_dossier_link.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_dossier_link.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_dossier_link.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_drop_down_list.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_drop_down_list.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_drop_down_list.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_drop_down_list.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_champ.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_editable_champ.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_champ.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_editable_champ.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_email.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_email.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_email.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_email.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_engagement.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_engagement.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_engagement.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_engagement.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_explication.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_explication.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_explication.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_explication.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_header_section.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_header_section.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_header_section.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_header_section.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_multiple_drop_down_list.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_multiple_drop_down_list.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_multiple_drop_down_list.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_multiple_drop_down_list.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_number.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_number.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_number.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_number.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_pays.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_pays.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_pays.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_pays.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_phone.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_phone.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_phone.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_phone.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_regions.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_regions.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_regions.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_regions.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_text.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_text.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_text.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_text.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_textarea.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_textarea.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_textarea.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_textarea.html.haml diff --git a/app/views/new_gestionnaire/dossiers/champs/_yes_no.html.haml b/app/views/new_gestionnaire/dossiers/editable_champs/_yes_no.html.haml similarity index 100% rename from app/views/new_gestionnaire/dossiers/champs/_yes_no.html.haml rename to app/views/new_gestionnaire/dossiers/editable_champs/_yes_no.html.haml From 4cb84e556d9b5e2d7731a87ea653e92eb87be24d Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 14 Dec 2017 16:21:14 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Update=20a=20class=E2=80=99=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/new_design/forms.scss | 2 +- .../dossiers/editable_champs/_editable_champ.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/new_design/forms.scss b/app/assets/stylesheets/new_design/forms.scss index 41769313d..c41729824 100644 --- a/app/assets/stylesheets/new_design/forms.scss +++ b/app/assets/stylesheets/new_design/forms.scss @@ -27,7 +27,7 @@ } } - .champ { + .editable-champ { .updated-at { @include notice-text-style; float: right; 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 index 6b0985b12..251d02bad 100644 --- a/app/views/new_gestionnaire/dossiers/editable_champs/_editable_champ.html.haml +++ b/app/views/new_gestionnaire/dossiers/editable_champs/_editable_champ.html.haml @@ -1,4 +1,4 @@ -.champ +.editable-champ - if is_not_header_nor_explication?(champ) = render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }