demarches-normaliennes/app/views/users/dossiers/index.html.haml

81 lines
3.8 KiB
Text
Raw Normal View History

- if @search_terms.present?
- content_for(:title, t(".title_search", scope: :metas, terms: @search_terms))
- else
- content_for(:title, t(".title", scope: :metas))
2018-08-29 17:09:48 +02:00
- content_for :footer do
2019-03-25 10:53:45 +01:00
= 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
2021-04-17 18:49:00 +02:00
%h1.page-title= t('views.users.dossiers.index.dossiers')
2021-12-24 18:10:50 +01:00
%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))
2021-12-24 18:10:50 +01:00
- 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))
2020-11-26 15:13:32 +01:00
2021-12-24 18:10:50 +01:00
- 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))
2022-01-05 10:43:13 +01:00
- 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))
2021-12-24 18:10:50 +01:00
- 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))
2018-03-28 15:02:37 +02:00
.container
- if @statut == "en-cours"
= render partial: "dossiers_list", locals: { dossiers: @user_dossiers }
2018-03-28 15:02:37 +02:00
- if @statut == "traites"
= render partial: "dossiers_list", locals: { dossiers: @dossiers_traites }
2020-12-07 15:10:26 +01:00
- if @statut == "dossiers-invites"
= render partial: "dossiers_list", locals: { dossiers: @dossiers_invites }
2022-01-05 10:43:13 +01:00
- if @statut == "dossiers-supprimes-recemment"
= render partial: "hidden_dossiers_list", locals: { hidden_dossiers: @dossiers_supprimes_recemment }
- if @statut == "dossiers-supprimes-definitivement"
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers_supprimes_definitivement }
- 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 }