diff --git a/app/assets/stylesheets/demande.scss b/app/assets/stylesheets/demande.scss index a31d9fb04..92be4d4e0 100644 --- a/app/assets/stylesheets/demande.scss +++ b/app/assets/stylesheets/demande.scss @@ -3,28 +3,21 @@ .dossier-show { .champ-row { - @media (min-width: 48em) { - display: flex; - } - padding: 0.5rem 1rem; } .champ-label { - font-weight: 600; margin-bottom: 0; - - @media (min-width: 48em) { - flex: 3; - margin-right: 1rem; - } + font-size: 0.8rem; + font-weight: 300; } .champ-content { padding: 0 0 0.5rem; + font-weight: 600; - @media (min-width: 48em) { - flex: 4; + a { + font-weight: normal; } p { @@ -37,6 +30,11 @@ } } + .champ-blank { + font-weight: normal; + font-style: italic; + } + .champ-updated { float: right; } diff --git a/app/components/dossiers/row_show_component.html.haml b/app/components/dossiers/row_show_component.html.haml index d9712c732..a4258b176 100644 --- a/app/components/dossiers/row_show_component.html.haml +++ b/app/components/dossiers/row_show_component.html.haml @@ -1,17 +1,16 @@ .champ-row - %p.champ-label= "#{label} :" + %p.champ-label + = "#{label} :" + - if updated_at.present? + %span.fr-ml-3v.champ-updated{ class: badge_updated_class } + = t(:updated_at, scope: [:views, :shared, :dossiers, :form], datetime: helpers.try_format_datetime(updated_at, format: :veryshort)) - if blank? .champ-content.fr-text-mention--grey{ class: content_class } - if usager? - %p - %em= blank + %p.champ-blank= blank - else - .champ-content{ class: content_class } - - if updated_at.present? - %p.fr-mb-1v.fr-ml-3v.champ-updated - %span{ class: badge_updated_class } - = t(:updated_at, scope: [:views, :shared, :dossiers, :form], datetime: helpers.try_format_datetime(updated_at, format: :veryshort)) + .champ-content{ class: content_class } = value diff --git a/app/views/shared/dossiers/_demande.html.haml b/app/views/shared/dossiers/_demande.html.haml index ee16bc49f..548f7931b 100644 --- a/app/views/shared/dossiers/_demande.html.haml +++ b/app/views/shared/dossiers/_demande.html.haml @@ -2,9 +2,9 @@ - content_for(:notice_info) do = render partial: "shared/dossiers/france_connect_informations_notice", locals: { user_information: dossier.france_connect_information } -.fr-container.counter-start-header-section.dossier-show +.fr-container.counter-start-header-section.dossier-show{ class: class_names("dossier-show-instructeur" => profile =="instructeur") } .fr-grid-row.fr-grid-row--center - .fr-col-12 + .fr-col-12.fr-col-xl-8 %h2.fr-h6.fr-background-alt--grey.fr-mb-0 .flex-grow.fr-py-3v.fr-px-2w= t('views.shared.dossiers.demande.en_construction') diff --git a/app/views/shared/dossiers/_identite_entreprise.html.haml b/app/views/shared/dossiers/_identite_entreprise.html.haml index 55ba60053..bdc7a60f8 100644 --- a/app/views/shared/dossiers/_identite_entreprise.html.haml +++ b/app/views/shared/dossiers/_identite_entreprise.html.haml @@ -175,7 +175,8 @@ %p= try_format_date(etablissement.association_date_declaration) - unless local_assigns[:short_identity] - %p.text-center - = link_to "➡ Autres informations sur l’organisme sur « annuaire-entreprises.data.gouv.fr » (ex: fiche d’immatriculation RNCS)", - annuaire_link(etablissement.siret), - **external_link_attributes + .champ-row + %p + = link_to "➡ Autres informations sur l’organisme sur « annuaire-entreprises.data.gouv.fr »", + annuaire_link(etablissement.siret), + **external_link_attributes diff --git a/app/views/users/dossiers/demande.html.haml b/app/views/users/dossiers/demande.html.haml index fceadfe53..346b2cfa1 100644 --- a/app/views/users/dossiers/demande.html.haml +++ b/app/views/users/dossiers/demande.html.haml @@ -17,5 +17,7 @@ - if !@dossier.read_only? .fr-container.fr-mt-2w - %p= link_to t('views.users.dossiers.demande.edit_dossier'), modifier_dossier_path(@dossier), class: 'fr-btn fr-btn-sm', - title: "Modifier mon dossier tant qu'il n'est pas passé en instruction" + .fr-grid-row + .fr-col-xl-8.fr-col-offset-xl-2 + %p= link_to t('views.users.dossiers.demande.edit_dossier'), modifier_dossier_path(@dossier), class: 'fr-btn fr-btn-sm', + title: t('views.users.dossiers.demande.edit_dossier_title') diff --git a/app/views/users/dossiers/show/_header.html.haml b/app/views/users/dossiers/show/_header.html.haml index 6d3e4e2b4..d2b3194de 100644 --- a/app/views/users/dossiers/show/_header.html.haml +++ b/app/views/users/dossiers/show/_header.html.haml @@ -17,8 +17,8 @@ .header-actions = render partial: 'invites/dropdown', locals: { dossier: dossier, morphing: false } - if dossier.can_be_updated_by_user? && !current_page?(modifier_dossier_path(dossier)) - = link_to t('views.users.dossiers.show.header.edit_dossier'), modifier_dossier_path(dossier), class: 'fr-btn fr-btn-sm', - title: t('views.users.dossiers.show.header.edit_dossier_title') + = link_to t('views.users.dossiers.demande.edit_dossier'), modifier_dossier_path(dossier), class: 'fr-btn fr-btn-sm', + title: t('views.users.dossiers.demande.edit_dossier_title') = render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier }) %nav.tabs diff --git a/config/locales/en.yml b/config/locales/en.yml index 217c3e8fa..b91ccadad 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -422,8 +422,6 @@ en: submit_dossier: Submit an other file show: header: - edit_dossier: Edit my file - edit_dossier_title: "Edit my file - You can modify your file as long as it has not been sent for processing" summary: "Summary" request: "Request" mailbox: "Mailbox" @@ -453,7 +451,8 @@ en: messagerie: mailbox: "The mailbox allows you to contact the instructor in charge of your file." demande: - edit_dossier: "Edit file" + edit_dossier: Edit file + edit_dossier_title: "Edit my file - You can modify your file as long as it has not been sent for processing" search: search_file: Search a file (File number, keywords) simple: Search diff --git a/config/locales/fr.yml b/config/locales/fr.yml index ffffe9ace..d8b4bb583 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -424,8 +424,6 @@ fr: submit_dossier: Déposer un autre dossier show: header: - edit_dossier: Modifier mon dossier - edit_dossier_title: "Modifier mon dossier - Vous pouvez modifier votre dossier tant qu’il n’est pas passé en instruction" summary: "Résumé" request: "Demande" mailbox: "Messagerie" @@ -455,7 +453,8 @@ fr: messagerie: mailbox: "La messagerie vous permet de contacter l’instructeur en charge de votre dossier." demande: - edit_dossier: "Modifier le dossier" + edit_dossier: Modifier le dossier + edit_dossier_title: "Modifier mon dossier - Vous pouvez modifier votre dossier tant qu’il n’est pas passé en instruction" search: search_file: Rechercher un dossier (N° de dossier, mots-clés) simple: Rechercher diff --git a/spec/system/users/dossier_shared_examples.rb b/spec/system/users/dossier_shared_examples.rb index ee50b85f6..67910e147 100644 --- a/spec/system/users/dossier_shared_examples.rb +++ b/spec/system/users/dossier_shared_examples.rb @@ -6,7 +6,7 @@ RSpec.shared_examples 'the user can edit the submitted demande' do click_on 'Demande' expect(page).to have_current_path(demande_dossier_path(dossier)) - click_on 'Modifier le dossier' + click_on 'Modifier le dossier', match: :first expect(page).to have_current_path(modifier_dossier_path(dossier)) fill_in('Texte obligatoire', with: 'Nouveau texte')