change no file message if filters are selected

This commit is contained in:
Lisa Durand 2023-05-03 12:06:30 +02:00
parent 1ab3dbb864
commit 7aca10377c
5 changed files with 26 additions and 11 deletions

View file

@ -1,6 +1,6 @@
.fr-grid-row
.fr-col
%nav.fr-translate.fr-nav{ role: "filter" }
%nav.fr-translate.fr-nav{ role: "combobox" }
.fr-nav__item.custom-fr-translate-flex-end
%button.fr-translate__btn.translate-no-icon.fr-btn.fr-btn--tertiary.custom-fr-translate-no-icon{ "aria-controls" => "filters", "aria-expanded" => "false", title: t('.button.select_filters') }
= t('.button.filter_title')

View file

@ -46,9 +46,16 @@
= paginate dossiers, views_prefix: 'shared'
- else
.blank-tab
%h2.empty-text Aucun dossier
%p.empty-text-details
Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche.
%br
Celui ci doit ressembler à #{APPLICATION_BASE_URL}/commencer/xxx.
- if filter.filter_params.present?
.blank-tab
%h2.empty-text= t('views.users.dossiers.dossiers_list.no_result_title')
%p.empty-text-details
= t('views.users.dossiers.dossiers_list.no_result_text_with_filter')
%br
= link_to t('views.users.dossiers.dossiers_list.no_result_reset_filter'), dossiers_path(statut: statut), class: 'fr-btn fr-btn--sm fr-mt-2w'
- else
.blank-tab
%h2.empty-text= t('views.users.dossiers.dossiers_list.no_result_title')
%p.empty-text-details
= t('views.users.dossiers.dossiers_list.no_result_text_html')

View file

@ -80,13 +80,13 @@
= t('users.dossiers.header.callout.first_brouillon_recently_updated_text', time_ago: time_ago_in_words(@first_brouillon_recently_updated.created_at), libelle: @first_brouillon_recently_updated.procedure.libelle )
= link_to t('users.dossiers.header.callout.first_brouillon_recently_updated_button'), url_for_dossier(@first_brouillon_recently_updated), class: 'fr-btn'
= render partial: "dossiers_list", locals: { dossiers: @dossiers }
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
- if @statut == "traites"
= render partial: "dossiers_list", locals: { dossiers: @dossiers }
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
- if @statut == "dossiers-invites"
= render partial: "dossiers_list", locals: { dossiers: @dossiers }
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
- if @statut == "dossiers-supprimes-recemment"
= render partial: "hidden_dossiers_list", locals: { hidden_dossiers: @dossiers }
@ -99,4 +99,4 @@
= render partial: "transfered_dossiers_list", locals: { dossier_transfers: @dossiers }
- if @statut == "dossiers-expirant"
= render partial: "dossiers_list", locals: { dossiers: @dossiers }
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }

View file

@ -460,6 +460,10 @@ en:
status: "Status"
updated: "Updated"
actions: "Actions"
no_result_title: No files
no_result_text_html: "To fill a procedure, contact your administration asking for the procedure link. <br> It should look like #{APPLICATION_BASE_URL}/commencer/xxx."
no_result_text_with_filter: found with selected filters
no_result_reset_filter: Reset filters
transfers:
sender_demande_en_cours: "A transfer request is pending on file Nº %{id} to %{email}"
receiver_demande_en_cours: "Transfer request on file Nº %{id} sent by %{email}"

View file

@ -461,6 +461,10 @@ fr:
status: "Statut"
updated: "Mis à jour"
actions: "Actions"
no_result_title: Aucun dossier
no_result_text_html: "Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche. <br> Celui ci doit ressembler à #{APPLICATION_BASE_URL}/commencer/xxx."
no_result_text_with_filter: ne correspond aux filtres sélectionnés
no_result_reset_filter: Réinitialiser les filtres
dossier_action:
edit_dossier: "Modifier le dossier"
start_other_dossier: "Commencer un autre dossier vide"