From 3c880a084955afc14327bdd2af57986fdbf94173 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 25 Nov 2024 10:53:45 +0100 Subject: [PATCH 1/3] style: fix all procedures table borders on safari --- app/views/administrateurs/procedures/_detail.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/administrateurs/procedures/_detail.html.haml b/app/views/administrateurs/procedures/_detail.html.haml index a2855bbf9..fc7ffd875 100644 --- a/app/views/administrateurs/procedures/_detail.html.haml +++ b/app/views/administrateurs/procedures/_detail.html.haml @@ -1,5 +1,5 @@ %tr.procedure{ id: "procedure_#{procedure.id}" } - %th.fr-cell--fixed{ scope: 'row' } + %th{ scope: 'row' } - title = show_detail ? 'Cacher les détails de la démarche' : 'Afficher les détails de la démarche' - icon = show_detail ? 'fr-icon-subtract-line' : 'fr-icon-add-line' - params = show_detail ? {} : { show_detail: true } From f399c7eb2ad63cc895c60f472194e820b6283de6 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 25 Nov 2024 11:35:58 +0100 Subject: [PATCH 2/3] style(labels): fix new admin labels table --- .../administrateurs/labels/index.html.haml | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/app/views/administrateurs/labels/index.html.haml b/app/views/administrateurs/labels/index.html.haml index f6ea78c76..666b14d49 100644 --- a/app/views/administrateurs/labels/index.html.haml +++ b/app/views/administrateurs/labels/index.html.haml @@ -13,31 +13,34 @@ class: "fr-btn fr-btn--primary fr-btn--icon-left fr-icon-add-circle-line mb-3" - if @procedure.labels.present? - .fr-table.fr-table--layout-fixed - %table - %caption Liste des labels - %thead - %tr - %th{ scope: "col" } - Nom - %th.change{ scope: "col" } - Actions + .fr-table.fr-table--lg + .fr-table__wrapper + .fr-table__container + .fr-table__content + %table + %caption Liste des labels + %thead + %tr + %th{ scope: "col" } + Nom + %th.change{ scope: "col" } + Actions - %tbody - - @labels.each do |label| - %tr - %td - = tag_label(label.name, label.color) - %td.change + %tbody + - @labels.each do |label| + %tr + %td + = tag_label(label.name, label.color) + %td.change - = link_to 'Modifier', - [:edit, :admin, @procedure, label], - class: 'fr-btn fr-btn--sm fr-btn--secondary fr-btn--icon-left fr-icon-pencil-line' + = link_to 'Modifier', + [:edit, :admin, @procedure, label], + class: 'fr-btn fr-btn--sm fr-btn--secondary fr-btn--icon-left fr-icon-pencil-line' - = link_to 'Supprimer', - [:admin, @procedure, label], - method: :delete, - data: { confirm: "Confirmez vous la suppression de #{label.name}" }, - class: 'fr-btn fr-btn--sm fr-btn--secondary fr-btn--icon-left fr-icon-delete-line fr-ml-1w' + = link_to 'Supprimer', + [:admin, @procedure, label], + method: :delete, + data: { confirm: "Confirmez vous la suppression de #{label.name}" }, + class: 'fr-btn fr-btn--sm fr-btn--secondary fr-btn--icon-left fr-icon-delete-line fr-ml-1w' = render Procedure::FixedFooterComponent.new(procedure: @procedure) From 6ad6f2167b920861fb0ae22ce5385725bcec8ef6 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 25 Nov 2024 11:36:27 +0100 Subject: [PATCH 3/3] style(admin): fix all administrateurs table --- .../procedures/_detail.html.haml | 2 +- .../procedures/administrateurs.html.haml | 88 ++++++++++--------- 2 files changed, 48 insertions(+), 42 deletions(-) diff --git a/app/views/administrateurs/procedures/_detail.html.haml b/app/views/administrateurs/procedures/_detail.html.haml index fc7ffd875..9f898ac17 100644 --- a/app/views/administrateurs/procedures/_detail.html.haml +++ b/app/views/administrateurs/procedures/_detail.html.haml @@ -1,5 +1,5 @@ %tr.procedure{ id: "procedure_#{procedure.id}" } - %th{ scope: 'row' } + %th.fr-cell--center{ scope: 'row' } - title = show_detail ? 'Cacher les détails de la démarche' : 'Afficher les détails de la démarche' - icon = show_detail ? 'fr-icon-subtract-line' : 'fr-icon-add-line' - params = show_detail ? {} : { show_detail: true } diff --git a/app/views/administrateurs/procedures/administrateurs.html.haml b/app/views/administrateurs/procedures/administrateurs.html.haml index 6de4928d2..79eb1f9dd 100644 --- a/app/views/administrateurs/procedures/administrateurs.html.haml +++ b/app/views/administrateurs/procedures/administrateurs.html.haml @@ -10,45 +10,51 @@ = f.label 'email', 'Rechercher des administrateurs par email', class: 'fr-label' = f.search_field 'email', size: 40, class: 'fr-input', data: { turbo_force: :server } .actions= link_to 'Voir la liste des démarches', all_admin_procedures_path(@filter.params), class: 'fr-btn fr-btn--secondary' + + - if @filter.email + .selected-email.fr-mb-2w + = link_to @filter.email, administrateurs_admin_procedures_path(@filter.without(:email)), class: 'fr-tag fr-tag--dismiss fr-mb-1w' + - if @filter.selected_zones.present? + .selected-zones.fr-mb-2w + - @filter.selected_zones.each do |zone| + = link_to zone.current_label, all_admin_procedures_path(@filter.without(:zone_ids, zone.id)), class: 'fr-tag fr-tag--dismiss fr-mb-1w' + - if @filter.statuses.present? + .selected-statuses.fr-mb-2w + - @filter.statuses.each do |status| + = link_to status, all_admin_procedures_path(@filter.without(:statuses, status)), class: 'fr-tag fr-tag--dismiss fr-mb-1w' + - if @filter.from_publication_date.present? + .selected-from-publication-date.fr-mb-2w + = link_to "Depuis le #{l(@filter.from_publication_date)}", all_admin_procedures_path(@filter.without(:from_publication_date)), class: 'fr-tag fr-tag--dismiss fr-mb-1w' + .fr-table.fr-table--bordered - %table#all-admins - %caption - = "#{@admins.total_count} administrateurs" - %span.hidden.spinner{ 'aria-hidden': 'true', 'data-turbo-target': 'spinner' } - - if @filter.email - .selected-email.fr-mb-2w - = link_to @filter.email, administrateurs_admin_procedures_path(@filter.without(:email)), class: 'fr-tag fr-tag--dismiss fr-mb-1w' - - if @filter.selected_zones.present? - .selected-zones.fr-mb-2w - - @filter.selected_zones.each do |zone| - = link_to zone.current_label, all_admin_procedures_path(@filter.without(:zone_ids, zone.id)), class: 'fr-tag fr-tag--dismiss fr-mb-1w' - - if @filter.statuses.present? - .selected-statuses.fr-mb-2w - - @filter.statuses.each do |status| - = link_to status, all_admin_procedures_path(@filter.without(:statuses, status)), class: 'fr-tag fr-tag--dismiss fr-mb-1w' - - if @filter.from_publication_date.present? - .selected-from-publication-date.fr-mb-2w - = link_to "Depuis le #{l(@filter.from_publication_date)}", all_admin_procedures_path(@filter.without(:from_publication_date)), class: 'fr-tag fr-tag--dismiss fr-mb-1w' - = paginate @admins, views_prefix: 'shared' - %thead - %tr - %th{ scope: 'col' } - %th{ scope: 'col' } Administrateurs - %th{ scope: 'col' } Nb démarches - %th{ scope: 'col' } Inscrit le - - @admins.each do |admin| - %tbody{ 'data-controller': 'expand' } - %tr.procedure{ 'data-action': 'click->expand#toggle' } - %td - %button.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-mb-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' } - %td= admin.email - %td= admin.procedures.size - %td= l(admin.created_at, format: :message_date_without_time) - %tr.hidden{ 'data-expand-target': 'content' } - %td.fr-highlight--beige-gris-galet{ colspan: '6' } - .fr-container - .fr-col-12.fr-mr-1w - %ul - - admin.procedures.each do |procedure| - %li= procedure.libelle - .fr-mt-2w= paginate @admins, views_prefix: 'shared' + .fr-table__wrapper + .fr-table__container + .fr-table__content + %table#all-admins + %caption + = "#{@admins.total_count} administrateurs" + %span.hidden.spinner{ 'aria-hidden': 'true', 'data-turbo-target': 'spinner' } + %thead + %tr + %th{ scope: 'col' } + %th{ scope: 'col' } Administrateurs + %th{ scope: 'col' } Nb démarches + %th{ scope: 'col' } Inscrit le + - @admins.each do |admin| + %tbody{ 'data-controller': 'expand' } + %tr.procedure{ 'data-action': 'click->expand#toggle' } + %th.fr-cell--center{ scope: 'row' } + %button.fr-icon-add-line.fr-icon--sm.fr-mb-1w.fr-text-action-high--blue-france.fr-btn.fr-btn--tertiary-no-outline{ 'aria-hidden': 'true', 'data-expand-target': 'icon' } + %td= admin.email + %td.fr-cell--right.fr-cell--numeric= admin.procedures.size + %td.fr-cell--numeric= l(admin.created_at, format: :message_date_without_time) + %tr.hidden{ 'data-expand-target': 'content' } + %td.fr-cell--multiline.fr-background-alt--green-emeraude{ colspan: '4' } + %ul + - admin.procedures.each do |procedure| + %li= procedure.libelle + .fr-table__footer + .fr-table__footer--start + .fr-table__footer--middle + = paginate @admins, views_prefix: 'shared' + .fr-table__footer--end.flex-no-grow