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

78 lines
2.8 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} »
- elsif @dossiers_invites.count == 0
%h1.page-title Mes dossiers
- else
%h1.page-title Dossiers
%ul.tabs
= tab_item('mes dossiers',
dossiers_path(current_tab: 'mes-dossiers'),
active: @current_tab == 'mes-dossiers')
= tab_item('dossiers invités',
dossiers_path(current_tab: 'dossiers-invites'),
active: @current_tab == 'dossiers-invites')
2018-03-28 15:02:37 +02:00
.container
2018-06-25 15:14:22 +02:00
- if @dossiers.present?
%table.table.dossiers-table.hoverable
%thead
%tr
%th.number-col Nº dossier
2018-09-05 14:48:42 +02:00
%th Démarche
- if @dossiers.count > 1
%th Demandeur
2018-06-25 15:14:22 +02:00
%th.status-col Statut
%th.updated-at-col Mis à jour
%th.sr-only Actions
%tbody
- @dossiers.each do |dossier|
%tr{ data: { 'dossier-id': dossier.id } }
%td.number-col
= link_to(url_for_dossier(dossier), class: 'cell-link', tabindex: -1) do
%span.icon.folder
= dossier.id
%td
= link_to(url_for_dossier(dossier), class: 'cell-link') do
= procedure_libelle(dossier.procedure)
- if @dossiers.count > 1
%td.cell-link
= demandeur_dossier(dossier)
%td.status-col
= status_badge(dossier.state)
%td.updated-at-col.cell-link
= try_format_date(dossier.updated_at)
%td.action-col
= render partial: 'dossier_actions', locals: { dossier: dossier }
2018-06-25 15:14:22 +02:00
= paginate(@dossiers)
2018-03-28 15:02:37 +02:00
- if current_user.feedbacks.empty? || current_user.feedbacks.last.created_at < 1.month.ago
#user-satisfaction
2018-08-27 11:49:36 +02:00
%h3 Que pensez-vous de la facilité d'utilisation de ce service ?
.icons
= link_to feedback_path(rating: Feedback.ratings.fetch(:unhappy)), data: { remote: true, method: :post } do
%span.icon.frown
= link_to feedback_path(rating: Feedback.ratings.fetch(:neutral)), data: { remote: true, method: :post } do
%span.icon.meh
= link_to feedback_path(rating: Feedback.ratings.fetch(:happy)), data: { remote: true, method: :post } do
%span.icon.smile
2018-06-25 15:14:22 +02:00
- 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.