style(instructeurs): convert filters to DSFR tags

This commit is contained in:
Colin Darie 2022-12-14 22:41:11 +01:00
parent 84aabd4187
commit 7ff6455440
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 5 additions and 6 deletions

View file

@ -6,11 +6,10 @@
- current_filters.group_by { |filter| filter['table'] }.each_with_index do |(table, filters), i|
- if i > 0
et
= " et "
- filters.each_with_index do |filter, i|
- if i > 0
ou
%span.filter
= link_to remove_filter_instructeur_procedure_path(procedure, { statut: statut, field: "#{filter['table']}/#{filter['column']}", value: filter['value'] }) do
%img.close-icon{ src: image_url("close.svg") }
= " ou "
= link_to remove_filter_instructeur_procedure_path(procedure, { statut: statut, field: "#{filter['table']}/#{filter['column']}", value: filter['value'] }),
class: "fr-tag fr-tag--dismiss fr-mb-1w", aria: { label: "Retirer le filtre #{filter['column']}" } do
= "#{filter['label'].truncate(50)} : #{procedure_presentation.human_value_for_filter(filter)}"

View file

@ -126,7 +126,7 @@ describe "procedure filters" do
end
def remove_filter(filter_value)
find(:xpath, "(//span[contains(@class, 'filter')]/a[contains(@href, '#{CGI.escape(filter_value)}')])[1]").click
click_link text: filter_value
end
def add_filter(column_name, filter_value)