Remove .fr-grid-row.fr-grid-row--gutters when empty

This commit is contained in:
Corinne Durrmeyer 2024-09-19 11:55:43 +02:00
parent 2885a25aba
commit 5c6eb69c43
No known key found for this signature in database
GPG key ID: DDC049DDA35585B6

View file

@ -7,11 +7,12 @@
.fr-container .fr-container
%h1.page-title.fr-h2= t('views.users.dossiers.index.dossiers') %h1.page-title.fr-h2= t('views.users.dossiers.index.dossiers')
- if current_user.dossiers.count > 2 || current_user.dossiers_invites.count > 2 || @procedures_for_select.size > 1
.fr-grid-row.fr-grid-row--gutters .fr-grid-row.fr-grid-row--gutters
- if current_user.dossiers.count > 2 || current_user.dossiers_invites.count > 2 - if current_user.dossiers.count > 2 || current_user.dossiers_invites.count > 2
.fr-col .fr-col.fr-mb-5w
#search-2.fr-search-bar #search-2.fr-search-bar
= form_tag dossiers_path, method: :get, :role => "search", class: "width-100 fr-mb-5w" do = form_tag dossiers_path, method: :get, :role => "search", class: "width-100" do
= hidden_field_tag :procedure_id, params[:procedure_id] = hidden_field_tag :procedure_id, params[:procedure_id]
= label_tag "q", t('views.users.dossiers.search.label'), class: 'fr-label fr-mb-1w' = label_tag "q", t('views.users.dossiers.search.label'), class: 'fr-label fr-mb-1w'
.flex .flex
@ -19,7 +20,7 @@
%button.fr-btn.fr-btn--sm %button.fr-btn.fr-btn--sm
= t('views.users.dossiers.search.label') = t('views.users.dossiers.search.label')
- if @procedures_for_select.size > 1 - if @procedures_for_select.size > 1
.fr-col .fr-col.fr-mb-5w
= render Dossiers::UserProcedureFilterComponent.new(procedures_for_select: @procedures_for_select) = render Dossiers::UserProcedureFilterComponent.new(procedures_for_select: @procedures_for_select)
- if @search_terms.blank? - if @search_terms.blank?