- if @search_terms.present? - content_for(:title, t(".title_search", scope: :metas, terms: @search_terms)) - else - content_for(:title, t(".title", scope: :metas)) - content_for :footer do = render partial: "users/dossiers/index_footer" .dossiers-headers.sub-header .container %h1.page-title.fr-h2= t('views.users.dossiers.index.dossiers') - if current_user.dossiers.count > 2 #search-2.fr-search-bar.fr-search-bar--lg = form_tag recherche_dossiers_path, method: :get, :role => "search", class: "flex width-100 fr-mb-5w" do = label_tag "q", t('views.users.dossiers.search.search_file'), class: 'fr-label' = text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: t('views.users.dossiers.search.search_file'), class: "fr-input" %button.fr-btn = t('views.users.dossiers.search.simple') - if @search_terms.blank? %nav.tabs{ role: 'navigation', 'aria-label': t('views.users.dossiers.secondary_menu') } %ul - if @user_dossiers.present? = tab_item(t('pluralize.en_cours', count: @user_dossiers.count), dossiers_path(statut: 'en-cours'), active: @statut == 'en-cours', badge: number_with_html_delimiter(@user_dossiers.count)) - if @dossiers_traites.present? // TODO: when renaming this tab in "Terminé", update notify_near_deletion_to_user email wording accordingly. = tab_item(t('pluralize.traites', count: @dossiers_traites.count), dossiers_path(statut: 'traites'), active: @statut == 'traites', badge: number_with_html_delimiter(@dossiers_traites.count)) - if @dossiers_invites.present? = tab_item(t('pluralize.dossiers_invites', count: @dossiers_invites.count), dossiers_path(statut: 'dossiers-invites'), active: @statut == 'dossiers-invites', badge: number_with_html_delimiter(@dossiers_invites.count)) - if @dossiers_close_to_expiration.count > 0 = tab_item(t('pluralize.dossiers_close_to_expiration', count: @dossiers_close_to_expiration.count), dossiers_path(statut: 'dossiers-expirant'), active: @statut == 'dossiers-expirant', badge: number_with_html_delimiter(@dossiers_close_to_expiration.count)) - if @dossiers_supprimes_recemment.present? = tab_item(t('pluralize.dossiers_supprimes_recemment', count: @dossiers_supprimes_recemment.count), dossiers_path(statut: 'dossiers-supprimes-recemment'), active: @statut == 'dossiers-supprimes-recemment', badge: number_with_html_delimiter(@dossiers_supprimes_recemment.count)) - if @dossiers_supprimes_definitivement.present? = tab_item(t('pluralize.dossiers_supprimes_definitivement', count: @dossiers_supprimes_definitivement.count), dossiers_path(statut: 'dossiers-supprimes-definitivement'), active: @statut == 'dossiers-supprimes-definitivement', badge: number_with_html_delimiter(@dossiers_supprimes_definitivement.count)) - if @dossier_transfers.present? = tab_item(t('pluralize.dossiers_transferes', count: @dossier_transfers.count), dossiers_path(statut: 'dossiers-transferes'), active: @statut == 'dossiers-transferes', badge: number_with_html_delimiter(@dossier_transfers.count)) .fr-container - if @statut == "en-cours" - if @first_brouillon_recently_updated.present? = render Dsfr::CalloutComponent.new(title: t('users.dossiers.header.callout.first_brouillon_recently_updated_title'), heading_level: 'h2') do |c| - c.with_body do %p = 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' - if @search_terms.present? %h2.page-title Résultat de la recherche pour « #{@search_terms} » = render partial: "dossiers_list", locals: { dossiers: @dossiers } - else = render Dossiers::UserFilterComponent.new(statut: @statut, filter: @filter) - if @statut == "en-cours" = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut } - if @statut == "traites" = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut } - if @statut == "dossiers-invites" = 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 } - if @statut == "dossiers-supprimes-definitivement" = render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers } - if @statut == "dossiers-transferes" -# /!\ in this context, @dossiers is a collection of DossierTransfer not Dossier = render partial: "transfered_dossiers_list", locals: { dossier_transfers: @dossiers } - if @statut == "dossiers-expirant" = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }