From b43889146fcd6f6681f4260fe3cee1abda94d146 Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Thu, 6 Jul 2023 17:36:28 +0200 Subject: [PATCH] feebacks PR Colin part 2 --- app/assets/stylesheets/card.scss | 2 +- .../dossiers/_deleted_dossiers_list.html.haml | 2 +- .../users/dossiers/_dossiers_list.html.haml | 4 +-- app/views/users/dossiers/index.html.haml | 36 ++++++++++--------- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/assets/stylesheets/card.scss b/app/assets/stylesheets/card.scss index 49f968b5c..8f8bd538b 100644 --- a/app/assets/stylesheets/card.scss +++ b/app/assets/stylesheets/card.scss @@ -4,7 +4,7 @@ .card { padding: ($default-spacer * 3) ($default-spacer * 2); border: 1px solid $border-grey; - margin-bottom: $default-spacer * 2; + margin-bottom: $default-spacer * 4; background: #FFFFFF; .card-title { diff --git a/app/views/users/dossiers/_deleted_dossiers_list.html.haml b/app/views/users/dossiers/_deleted_dossiers_list.html.haml index b38f6468e..853a0c4ea 100644 --- a/app/views/users/dossiers/_deleted_dossiers_list.html.haml +++ b/app/views/users/dossiers/_deleted_dossiers_list.html.haml @@ -19,7 +19,7 @@ = t('views.users.dossiers.dossiers_list.n_dossier') = dossier.dossier_id - %span.fr-badge.fr-badge--warning + %span.fr-badge.fr-badge--sm.fr-badge--warning = t('views.users.dossiers.dossiers_list.deleted_badge') = paginate deleted_dossiers, views_prefix: 'shared' diff --git a/app/views/users/dossiers/_dossiers_list.html.haml b/app/views/users/dossiers/_dossiers_list.html.haml index 023e87a50..566c2dbd3 100644 --- a/app/views/users/dossiers/_dossiers_list.html.haml +++ b/app/views/users/dossiers/_dossiers_list.html.haml @@ -42,7 +42,7 @@ = dossier.id - if @statut == "dossiers-supprimes-recemment" - %span.fr-badge.fr-badge--warning + %span.fr-badge.fr-badge--sm.fr-badge--warning = t('views.users.dossiers.dossiers_list.deleted_badge') - else = status_badge(dossier.state, 'fr-mb-1w') @@ -51,7 +51,7 @@ %br = pending_correction_badge(:for_user) - - if dossier.procedure.close? + - if dossier.procedure.close? && !dossier.termine? = render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: "fr-mb-2w") do |c| - c.body do %p diff --git a/app/views/users/dossiers/index.html.haml b/app/views/users/dossiers/index.html.haml index 363bdd5d4..0517f8a9e 100644 --- a/app/views/users/dossiers/index.html.haml +++ b/app/views/users/dossiers/index.html.haml @@ -63,23 +63,25 @@ badge: number_with_html_delimiter(@dossier_transferes.count)) .fr-container - - if @statut == "en-cours" - - if @first_brouillon_recently_updated.present? - = render Dsfr::CalloutComponent.new(title: t('users.dossiers.header.callout.first_brouillon_recently_updated_title'), heading_level: 'h2') do |c| - - c.with_body do - %p - = t('users.dossiers.header.callout.first_brouillon_recently_updated_text', time_ago: time_ago_in_words(@first_brouillon_recently_updated.created_at), libelle: @first_brouillon_recently_updated.procedure.libelle ) - = link_to t('users.dossiers.header.callout.first_brouillon_recently_updated_button'), url_for_dossier(@first_brouillon_recently_updated), class: 'fr-btn' + .fr-grid-row.fr-grid-row--center + .fr-col-xl-10 + - if @statut == "en-cours" + - if @first_brouillon_recently_updated.present? + = render Dsfr::CalloutComponent.new(title: t('users.dossiers.header.callout.first_brouillon_recently_updated_title'), heading_level: 'h2') do |c| + - c.with_body do + %p + = t('users.dossiers.header.callout.first_brouillon_recently_updated_text', time_ago: time_ago_in_words(@first_brouillon_recently_updated.created_at), libelle: @first_brouillon_recently_updated.procedure.libelle ) + = link_to t('users.dossiers.header.callout.first_brouillon_recently_updated_button'), url_for_dossier(@first_brouillon_recently_updated), class: 'fr-btn' - - if @search_terms.present? - %h2.page-title Résultat de la recherche pour « #{@search_terms} » - = render partial: "dossiers_list", locals: { dossiers: @dossiers } + - if @search_terms.present? + %h2.page-title Résultat de la recherche pour « #{@search_terms} » + = render partial: "dossiers_list", locals: { dossiers: @dossiers } - - else - = render Dossiers::UserFilterComponent.new(statut: @statut, filter: @filter) + - else + = render Dossiers::UserFilterComponent.new(statut: @statut, filter: @filter) - - if @statut == "dossiers-supprimes-definitivement" - -# /!\ in this context, @dossiers is a collection of DeletedDossier not Dossier - = render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers } - - else - = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut } + - if @statut == "dossiers-supprimes-definitivement" + -# /!\ in this context, @dossiers is a collection of DeletedDossier not Dossier + = render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers } + - else + = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }