demarches-normaliennes/app/views/backoffice/dossiers/_list.html.haml

34 lines
1.4 KiB
Text
Raw Normal View History

2016-01-08 11:39:04 +01:00
- unless smart_listing.empty?
%table.table
%thead
%th= smart_listing.sortable 'Procédure', 'procedure.libelle'
%th= smart_listing.sortable 'Raison sociale', 'entreprise.raison_sociale'
%th= smart_listing.sortable 'État', 'state'
%th= smart_listing.sortable 'Date de mise à jour', 'updated_at'
- unless @liste == 'termine'
%th.center Actions
%th.center Abonnés
2016-01-08 11:39:04 +01:00
- @dossiers.each do |dossier|
- dossier = dossier.decorate
%tr
%td.col-md-4.col-lg-4= dossier.procedure.libelle
%td.col-md-4.col-lg-4
= link_to(dossier.entreprise.raison_sociale, "/backoffice/dossiers/#{dossier.id}")
2016-01-08 11:39:04 +01:00
%td= dossier.display_state
%td= dossier.last_update
- unless @liste == 'termine'
%td.center
- if current_gestionnaire.follow?(dossier.id)
= link_to('Quitter'.html_safe, backoffice_dossier_follow_path(dossier_id: dossier.id), 'data-method' => :put, class: 'btn-sm btn-danger', id: "suivre_dossier_#{dossier.id}")
-else
= link_to('Suivre', backoffice_dossier_follow_path(dossier_id: dossier.id), 'data-method' => :put, class: 'btn-sm btn-primary', id: "suivre_dossier_#{dossier.id}")
%td.center{style:"color: #{dossier.total_follow == 0 ? 'red' : ''}"}
= dossier.total_follow
2016-01-08 11:39:04 +01:00
= smart_listing.paginate
= smart_listing.pagination_per_page_links
- else
%h4.center
Aucun dossier