demarches-normaliennes/app/views/backoffice/dossiers/_list.html.haml
2016-07-19 17:18:41 +02:00

31 lines
1.3 KiB
Text

- 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'
%th.center Actions
%th.center Abonnés
- @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}")
%td= dossier.display_state
%td= dossier.last_update
%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
= smart_listing.paginate
= smart_listing.pagination_per_page_links
- else
%h4.center
Aucun dossier