From 3f2c5da3aec2702e931204cfa9c71e641da66b26 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 25 Nov 2024 12:31:05 +0100 Subject: [PATCH 1/4] fix(instructeurs): cells on multilines --- app/views/instructeurs/procedures/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/instructeurs/procedures/show.html.haml b/app/views/instructeurs/procedures/show.html.haml index cb4f5960d..22be74cc4 100644 --- a/app/views/instructeurs/procedures/show.html.haml +++ b/app/views/instructeurs/procedures/show.html.haml @@ -138,7 +138,7 @@ - p.columns.each do |column| - %td + %td.fr-cell--multiline - if p.hidden_by_administration_at.present? %span.cell-link = column.is_a?(Hash) ? tags_label(column[:value]) : column From dc8cc2eba816b739cb4f8b6803600220d567a1e0 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 25 Nov 2024 12:33:53 +0100 Subject: [PATCH 2/4] style(instructeurs): dossier number render as real link --- app/assets/stylesheets/dossiers_table.scss | 6 +++++- app/views/experts/avis/procedure.html.haml | 2 +- app/views/instructeurs/procedures/show.html.haml | 2 +- app/views/recherche/index.html.haml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/dossiers_table.scss b/app/assets/stylesheets/dossiers_table.scss index 4fca583c1..e55695880 100644 --- a/app/assets/stylesheets/dossiers_table.scss +++ b/app/assets/stylesheets/dossiers_table.scss @@ -2,10 +2,14 @@ @import 'constants'; .dossiers-table { - a { + a:not(.fr-link) { background-image: none; // remove DSFR underline } + .fr-link { + font-size: inherit; // keep reduced size from .fr-table td, not 1rem from .fr-link + } + .fr-badge { white-space: nowrap; } diff --git a/app/views/experts/avis/procedure.html.haml b/app/views/experts/avis/procedure.html.haml index d0db1c7e0..e609ed056 100644 --- a/app/views/experts/avis/procedure.html.haml +++ b/app/views/experts/avis/procedure.html.haml @@ -43,7 +43,7 @@ - @avis.each do |avis| %tr %td.fr-cell--numeric - = link_to(expert_avis_path(avis.procedure, avis), class: 'cell-link') do + = link_to(expert_avis_path(avis.procedure, avis), class: "fr-link") do = avis.dossier.id %td= link_to(avis.dossier.user_email_for(:display), expert_avis_path(avis.procedure, avis), class: 'cell-link') %td= link_to(avis.procedure.libelle, expert_avis_path(avis.procedure, avis), class: 'cell-link') diff --git a/app/views/instructeurs/procedures/show.html.haml b/app/views/instructeurs/procedures/show.html.haml index 22be74cc4..6703c62fc 100644 --- a/app/views/instructeurs/procedures/show.html.haml +++ b/app/views/instructeurs/procedures/show.html.haml @@ -131,7 +131,7 @@ - if p.hidden_by_administration_at.present? %span.cell-link= p.dossier_id - else - %a.cell-link.relative{ href: path } + %a.fr-link.relative{ href: path } = p.dossier_id - if @not_archived_notifications_dossier_ids.include?(p.dossier_id) %span.notifications{ 'aria-label': 'notifications' } diff --git a/app/views/recherche/index.html.haml b/app/views/recherche/index.html.haml index a661edda3..33d560004 100644 --- a/app/views/recherche/index.html.haml +++ b/app/views/recherche/index.html.haml @@ -53,7 +53,7 @@ - else %td.fr-cell--numeric - %a.cell-link.relative{ href: path } + %a.fr-link.relative{ href: path } = p.dossier_id - if @notifications_dossier_ids.include?(p.dossier_id) %span.notifications{ 'aria-label': 'notifications' } From 741ac527efc282dddeb4ec61b2d08d017cf357f6 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 25 Nov 2024 12:38:20 +0100 Subject: [PATCH 3/4] style: remove obsolete usage of cell-link --- app/views/experts/avis/procedure.html.haml | 4 ++-- .../instructeurs/procedures/show.html.haml | 10 +++++----- app/views/recherche/_hidden_dossier.html.haml | 8 ++++---- app/views/recherche/index.html.haml | 17 +++++++---------- .../users/dossiers/_dossiers_list.html.haml | 2 +- 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/app/views/experts/avis/procedure.html.haml b/app/views/experts/avis/procedure.html.haml index e609ed056..b5d60c18e 100644 --- a/app/views/experts/avis/procedure.html.haml +++ b/app/views/experts/avis/procedure.html.haml @@ -45,8 +45,8 @@ %td.fr-cell--numeric = link_to(expert_avis_path(avis.procedure, avis), class: "fr-link") do = avis.dossier.id - %td= link_to(avis.dossier.user_email_for(:display), expert_avis_path(avis.procedure, avis), class: 'cell-link') - %td= link_to(avis.procedure.libelle, expert_avis_path(avis.procedure, avis), class: 'cell-link') + %td= link_to(avis.dossier.user_email_for(:display), expert_avis_path(avis.procedure, avis)) + %td= link_to(avis.procedure.libelle, expert_avis_path(avis.procedure, avis)) .fr-table__footer .fr-table__footer--start .fr-table__footer--middle diff --git a/app/views/instructeurs/procedures/show.html.haml b/app/views/instructeurs/procedures/show.html.haml index 6703c62fc..bc3bc3f31 100644 --- a/app/views/instructeurs/procedures/show.html.haml +++ b/app/views/instructeurs/procedures/show.html.haml @@ -129,7 +129,7 @@ %td.fr-cell--numeric - if p.hidden_by_administration_at.present? - %span.cell-link= p.dossier_id + %span= p.dossier_id - else %a.fr-link.relative{ href: path } = p.dossier_id @@ -140,12 +140,12 @@ - p.columns.each do |column| %td.fr-cell--multiline - if p.hidden_by_administration_at.present? - %span.cell-link + %span = column.is_a?(Hash) ? tags_label(column[:value]) : column - if p.hidden_by_user_at.present? = "- #{t("views.instructeurs.dossiers.deleted_reason.#{p.hidden_by_reason}")}" - else - %a.cell-link{ href: path } + %a{ href: path } = column.is_a?(Hash) ? tags_label(column[:value]) : column = "- #{t("views.instructeurs.dossiers.deleted_reason.#{p.hidden_by_reason}")}" if p.hidden_by_user_at.present? @@ -155,11 +155,11 @@ - status << pending_correction_badge(:for_instructeur, html_class: "fr-mt-1v") - elsif p.state.to_sym == :en_construction && p.resolved_corrections? - status << correction_resolved_badge(html_class: "fr-mt-1v") - = link_to_if(p.hidden_by_administration_at.blank?, safe_join(status), path, class: "cell-link flex column") + = link_to_if(p.hidden_by_administration_at.blank?, safe_join(status), path, class: "flex column") - if @procedure.sva_svr_enabled? %td - %span.cell-link + %span = link_to_if p.hidden_by_administration_at.blank?, render(Instructeurs::SVASVRDecisionBadgeComponent.new(projection_or_dossier: p, procedure: @procedure)), path %td.follow-col diff --git a/app/views/recherche/_hidden_dossier.html.haml b/app/views/recherche/_hidden_dossier.html.haml index 9939ec0ed..dad63a0c7 100644 --- a/app/views/recherche/_hidden_dossier.html.haml +++ b/app/views/recherche/_hidden_dossier.html.haml @@ -1,13 +1,13 @@ %td.fr-cell--numeric - %p.cell-link= p.dossier_id + %p= p.dossier_id %td - %p.cell-link= procedure_libelle + %p= procedure_libelle %td - %p.cell-link + %p = user_email = "- #{t('views.instructeurs.dossiers.deleted_by_administration')}" if p.hidden_by_administration_at.present? %td - %p.cell-link.flex.column= status_badge(p.state) + %p.flex.column= status_badge(p.state) diff --git a/app/views/recherche/index.html.haml b/app/views/recherche/index.html.haml index 33d560004..ad51cbcbd 100644 --- a/app/views/recherche/index.html.haml +++ b/app/views/recherche/index.html.haml @@ -37,16 +37,13 @@ %tr{ class: [p.hidden_by_administration_at.present? && "file-hidden-by-user"] } - if instructeur_and_expert_dossier %td.fr-cell--numeric - .cell-link.relative + .relative = p.dossier_id - if @notifications_dossier_ids.include?(p.dossier_id) %span.notifications{ 'aria-label': 'notifications' } - %td - .cell-link= procedure_libelle - %td - .cell-link= user_email - %td - .cell-link.flex.column= status_badge(p.state) + %td= procedure_libelle + %td= user_email + %td.flex.column= status_badge(p.state) - elsif hidden_by_administration = render partial: "recherche/hidden_dossier", locals: {p: p, procedure_libelle: procedure_libelle, user_email: user_email} @@ -59,13 +56,13 @@ %span.notifications{ 'aria-label': 'notifications' } %td - %a.cell-link{ href: path }= procedure_libelle + %a{ href: path }= procedure_libelle %td - %a.cell-link{ href: path }= user_email + %a{ href: path }= user_email %td - %a.cell-link.flex.column{ href: path }= status_badge(p.state) + %a.flex.column{ href: path }= status_badge(p.state) - if instructeur_dossier && expert_dossier diff --git a/app/views/users/dossiers/_dossiers_list.html.haml b/app/views/users/dossiers/_dossiers_list.html.haml index da58f4be2..2d9183fa2 100644 --- a/app/views/users/dossiers/_dossiers_list.html.haml +++ b/app/views/users/dossiers/_dossiers_list.html.haml @@ -8,7 +8,7 @@ %div %h3.card-title - if ["dossiers-transferes", "dossiers-supprimes"].exclude?(@statut) - = link_to(url_for_dossier(dossier), class: 'cell-link') do + = link_to(url_for_dossier(dossier)) do = dossier.procedure.libelle - else = dossier.procedure.libelle From 5d34d4f54dee87243dec2c64dc23b3f5bc3e2dd0 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 25 Nov 2024 12:44:09 +0100 Subject: [PATCH 4/4] style(dossiers): minimal width for checkbox header cell --- app/assets/stylesheets/dossiers_table.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/stylesheets/dossiers_table.scss b/app/assets/stylesheets/dossiers_table.scss index e55695880..dceaaa759 100644 --- a/app/assets/stylesheets/dossiers_table.scss +++ b/app/assets/stylesheets/dossiers_table.scss @@ -2,6 +2,10 @@ @import 'constants'; .dossiers-table { + .fr-cell--fixed { + width: 1%; // never expand this cell when table is too wide + } + a:not(.fr-link) { background-image: none; // remove DSFR underline }