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

46 lines
1.7 KiB
Text
Raw Normal View History

- if @search_terms.present?
- content_for(:title, "Recherche : #{@search_terms}")
- else
- content_for(:title, "Dossiers")
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
%h1.page-title Dossiers
%ul.tabs
2020-11-26 15:13:32 +01:00
- if @user_dossiers.count > 0
2020-12-07 15:10:26 +01:00
= tab_item(t('pluralize.mes_dossiers', count: @user_dossiers.count),
2020-11-26 15:13:32 +01:00
dossiers_path(statut: 'mes-dossiers'),
active: @statut == 'mes-dossiers',
badge: number_with_html_delimiter(@user_dossiers.count))
- if @dossiers_invites.count > 0
2020-12-07 15:10:26 +01:00
= tab_item(t('pluralize.dossiers_invites', count: @dossiers_invites.count),
2020-11-26 15:13:32 +01:00
dossiers_path(statut: 'dossiers-invites'),
active: @statut == 'dossiers-invites',
badge: number_with_html_delimiter(@dossiers_invites.count))
- if @dossiers_supprimes.count > 0
2020-12-07 15:10:26 +01:00
= tab_item(t('pluralize.dossiers_supprimes', count: @dossiers_supprimes.count),
2020-11-26 15:13:32 +01:00
dossiers_path(statut: 'dossiers-supprimes'),
active: @statut == 'dossiers-supprimes',
badge: number_with_html_delimiter(@dossiers_supprimes.count))
2018-03-28 15:02:37 +02:00
.container
2020-12-07 15:10:26 +01:00
- if @statut == "mes-dossiers"
= render partial: "dossiers_list", locals: { dossiers: @user_dossiers }
2018-03-28 15:02:37 +02:00
2020-12-07 15:10:26 +01:00
- if @statut == "dossiers-invites"
= render partial: "dossiers_list", locals: { dossiers: @dossiers_invites }
2020-12-07 15:10:26 +01:00
- if @statut == "dossiers-supprimes"
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers_supprimes }