From 0a2460ba71feb96f68585d4bc585977c3babe7bf Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Thu, 6 Oct 2022 14:42:14 +0200 Subject: [PATCH] style(admin): fix various links / buttons style --- app/assets/stylesheets/admin-procedures-list.scss | 4 ++-- app/assets/stylesheets/procedure_admin.scss | 8 ++++++++ .../procedures/_procedures_list.html.haml | 14 +++++++------- .../administrateurs/procedures/index.html.haml | 2 +- .../administrateurs/procedures/show.html.haml | 4 ++-- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/admin-procedures-list.scss b/app/assets/stylesheets/admin-procedures-list.scss index 16b41aff6..8369465a0 100644 --- a/app/assets/stylesheets/admin-procedures-list.scss +++ b/app/assets/stylesheets/admin-procedures-list.scss @@ -11,7 +11,7 @@ .admin-procedures-list-row.infos { align-items: flex-start; - a { - color: $blue-france-500; + a:not(:hover) { + background-image: none; // remove DSFR underline } } diff --git a/app/assets/stylesheets/procedure_admin.scss b/app/assets/stylesheets/procedure_admin.scss index 0ca1fb781..0ac90e1f7 100644 --- a/app/assets/stylesheets/procedure_admin.scss +++ b/app/assets/stylesheets/procedure_admin.scss @@ -2,6 +2,10 @@ .procedure-grid { display: flex; flex-wrap: wrap; + + & > a { + background-image: none; // remove DSFR underline + } } .procedure-admin-container { @@ -12,6 +16,10 @@ .button { margin-right: 10px; } + + a { + background-image: none; // remove DSFR underline + } } .procedure-admin-listing-container { diff --git a/app/views/administrateurs/procedures/_procedures_list.html.haml b/app/views/administrateurs/procedures/_procedures_list.html.haml index 1b360814d..7c0d12d9b 100644 --- a/app/views/administrateurs/procedures/_procedures_list.html.haml +++ b/app/views/administrateurs/procedures/_procedures_list.html.haml @@ -6,7 +6,7 @@ .flex.column.ml-1 .card-title = link_to procedure.libelle, admin_procedure_path(procedure), style: 'color: black;' - = link_to(procedure_lien(procedure), procedure_lien(procedure), class: 'mb-1') + = link_to(procedure_lien(procedure), procedure_lien(procedure), class: 'fr-link fr-mb-1w') .admin-procedures-list-timestamps %p.notice N° #{procedure.id} @@ -36,13 +36,13 @@ %span.icon.folder %span.badge.baseline= procedure.dossiers.state_not_brouillon.visible_by_administration.count - %div + %ul.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right - unless procedure.discarded? - = link_to admin_procedure_path(procedure), class: 'button mr-1 edit-procedure' do - %span.icon.edit - Modifier - .dropdown{ data: { controller: 'menu-button' } } - %button.button.dropdown-button.procedures-actions-btn{ data: { menu_button_target: 'button' } } + %li + = link_to admin_procedure_path(procedure), class: 'fr-btn fr-icon-draft-line fr-btn--tertiary' do + Modifier + %li.dropdown{ data: { controller: 'menu-button' } } + %button.fr-btn.fr-btn--tertiary.dropdown-button.procedures-actions-btn{ data: { menu_button_target: 'button' } } Actions .dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, id: dom_id(procedure, :actions_menu) } %ul.dropdown-items.pl-0 diff --git a/app/views/administrateurs/procedures/index.html.haml b/app/views/administrateurs/procedures/index.html.haml index 447624c63..bb261a189 100644 --- a/app/views/administrateurs/procedures/index.html.haml +++ b/app/views/administrateurs/procedures/index.html.haml @@ -1,6 +1,6 @@ .sub-header .procedure-admin-listing-container - = link_to "Nouvelle Démarche", new_from_existing_admin_procedures_path, id: 'new-procedure', class: 'button primary' + = link_to "Nouvelle Démarche", new_from_existing_admin_procedures_path, id: 'new-procedure', class: 'fr-btn' .container %nav.tabs diff --git a/app/views/administrateurs/procedures/show.html.haml b/app/views/administrateurs/procedures/show.html.haml index f742ce1ab..5df800982 100644 --- a/app/views/administrateurs/procedures/show.html.haml +++ b/app/views/administrateurs/procedures/show.html.haml @@ -49,8 +49,8 @@ = t(:has_changes, scope: [:administrateurs, :revision_changes]) = render partial: 'revision_changes', locals: { changes: @procedure.revision_changes } .flex.mt-2.justify-end - = button_to "Réinitialiser les modifications", admin_procedure_reset_draft_path(@procedure), class: 'button mr-1', method: :put - = link_to 'Publier les modifications', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." } + = button_to "Réinitialiser les modifications", admin_procedure_reset_draft_path(@procedure), class: 'fr-btn fr-btn--secondary fr-mr-2w', method: :put + = link_to 'Publier les modifications', admin_procedure_publication_path(@procedure), class: 'fr-btn', id: 'publish-procedure-link', data: { disable_with: "Publication..." } - if !@procedure.procedure_expires_when_termine_enabled? = render partial: 'administrateurs/procedures/suggest_expires_when_termine', locals: { procedure: @procedure }