style(instructeurs): convert filters to DSFR tags
This commit is contained in:
parent
84aabd4187
commit
7ff6455440
2 changed files with 5 additions and 6 deletions
|
@ -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)}"
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue