From 1c651b4c93567a2f5893f21113af3568a0e623a1 Mon Sep 17 00:00:00 2001 From: Kara Diaby Date: Tue, 1 Oct 2024 11:19:03 +0200 Subject: [PATCH] =?UTF-8?q?Les=20admins=20ont=20la=20possibilit=C3=A9=20de?= =?UTF-8?q?=20filtrer=20les=20d=C3=A9marches=20par=20liste=20pr=C3=A9d?= =?UTF-8?q?=C3=A9finie=20dans=20la=20page=20toutes=20les=20d=C3=A9marches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/all.html.haml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/app/views/layouts/all.html.haml b/app/views/layouts/all.html.haml index 44d69dacf..b7809a62b 100644 --- a/app/views/layouts/all.html.haml +++ b/app/views/layouts/all.html.haml @@ -25,6 +25,21 @@ %span.fr-icon-arrow-go-back-line Réinitialiser %ul + %li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" } + .fr-mb-1w + %button{ 'data-action': 'expand#toggle' } + %span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' } + Thématique + .fr-ml-1w.hidden{ 'data-expand-target': 'content' } + %div + = f.search_field :tags, placeholder: 'Choisissez un thème', list: 'tags_list', class: 'fr-input', data: { no_autosubmit: 'input', turbo_force: :server }, multiple: true + %datalist#tags_list + - ProcedureTag.order(:name).each do |tag| + %option{ value: tag.name, data: { id: tag.id } } + - if @filter.tags.present? + - @filter.tags.each do |tag| + = f.hidden_field :tags, value: tag, multiple: true, id: "tag-#{tag.tr(' ', '_')}" + %li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" } .fr-mb-1w %button{ 'data-action': 'expand#toggle' } @@ -105,22 +120,6 @@ = b.check_box(checked: @filter.status_filtered?(b.value)) = b.label(class: 'fr-label') { t b.text, scope: 'activerecord.attributes.procedure.aasm_state' } - - %li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" } - .fr-mb-1w - %button{ 'data-action': 'expand#toggle' } - %span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' } - Thématique - .fr-ml-1w.hidden{ 'data-expand-target': 'content' } - %div - = f.search_field :tags, placeholder: 'Choisissez un thème', list: 'tags_list', class: 'fr-input', data: { no_autosubmit: 'input', turbo_force: :server }, multiple: true - %datalist#tags_list - - Procedure.tags.each do |tag| - %option{ value: tag } - - if @filter.tags.present? - - @filter.tags.each do |tag| - = f.hidden_field :tags, value: tag, multiple: true, id: "tag-#{tag.tr(' ', '_')}" - .fr-col-9 = yield(:results) = render template: 'layouts/application'