demarches-normaliennes/app/views/users/dossiers/index.html.haml
2022-01-04 09:44:32 +01:00

70 lines
3.1 KiB
Text

- if @search_terms.present?
- content_for(:title, "Recherche : #{@search_terms}")
- else
- content_for(:title, "Dossiers")
- content_for :footer do
= render partial: "users/dossiers/index_footer"
.dossiers-headers.sub-header
.container
- if @search_terms.present?
%h1.page-title Résultat de la recherche pour « #{@search_terms} »
= render partial: "dossiers_list", locals: { dossiers: @dossiers }
- else
%h1.page-title= t('views.users.dossiers.index.dossiers')
%nav.tabs
%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?
= 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.present?
= tab_item(t('pluralize.dossiers_supprimes', count: @dossiers_supprimes.count),
dossiers_path(statut: 'dossiers-supprimes'),
active: @statut == 'dossiers-supprimes',
badge: number_with_html_delimiter(@dossiers_supprimes.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))
.container
- if @statut == "en-cours"
= render partial: "dossiers_list", locals: { dossiers: @user_dossiers }
- if @statut == "traites"
= render partial: "dossiers_list", locals: { dossiers: @dossiers_traites }
- if @statut == "dossiers-invites"
= render partial: "dossiers_list", locals: { dossiers: @dossiers_invites }
- if @statut == "dossiers-supprimes"
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers_supprimes }
- if @statut == "dossiers-transferes"
= render partial: "transfered_dossiers_list", locals: { dossier_transfers: @dossier_transfers }
- if @statut == "dossiers-expirant"
= render partial: "dossiers_list", locals: { dossiers: @dossiers_close_to_expiration }