2016-01-08 11:39:04 +01:00
|
|
|
- unless smart_listing.empty?
|
2016-11-08 14:08:16 +01:00
|
|
|
%table#dossiers_list.table
|
2016-01-08 11:39:04 +01:00
|
|
|
%thead
|
2016-12-20 11:58:17 +01:00
|
|
|
%th#sort-id.col-md-1.col-lg-1= smart_listing.sortable 'Numéro', 'id'
|
|
|
|
%th#sort-libelle.col-md-5.col-lg-5= smart_listing.sortable 'Procédure', 'procedure.libelle'
|
|
|
|
%th#sort-state.col-md-2.col-lg-2= smart_listing.sortable 'État', 'state'
|
|
|
|
%th#sort-updated.col-md-2.col-lg-2= smart_listing.sortable 'Date de mise à jour', 'updated_at'
|
2016-10-25 17:39:53 +02:00
|
|
|
- if @liste == "brouillon"
|
|
|
|
%th.col-md-2.col-lg-2= 'Action'
|
2016-01-08 11:39:04 +01:00
|
|
|
- @dossiers.each do |dossier|
|
2016-09-13 15:54:26 +02:00
|
|
|
- if dossier.kind_of? Invite
|
2016-12-20 11:58:17 +01:00
|
|
|
- invite = dossier
|
|
|
|
- dossier = invite.dossier.decorate
|
2016-02-09 12:23:31 +01:00
|
|
|
- else
|
|
|
|
- dossier = dossier.decorate
|
2016-11-08 14:08:16 +01:00
|
|
|
|
|
|
|
- dossier_url = users_dossiers_invite_path(id: invite.id) unless invite.nil?
|
|
|
|
- if invite.nil?
|
|
|
|
- dossier_url = users_dossier_recapitulatif_path(dossier) unless dossier.brouillon?
|
|
|
|
- dossier_url = users_dossier_description_path(dossier) if dossier.brouillon?
|
|
|
|
|
2016-11-08 15:13:40 +01:00
|
|
|
%tr{id: "tr_dossier_#{dossier.id}", 'data-dossier_url' => dossier_url}
|
2016-08-30 11:18:43 +02:00
|
|
|
%td.center
|
|
|
|
= dossier.id
|
2016-01-08 11:39:04 +01:00
|
|
|
%td
|
2016-11-08 14:08:16 +01:00
|
|
|
= dossier.procedure.libelle
|
2016-10-05 16:45:51 +02:00
|
|
|
|
2016-01-08 11:39:04 +01:00
|
|
|
%td{id: "dossier_#{dossier.id}_state"}= dossier.display_state
|
|
|
|
%td= dossier.last_update
|
2016-10-25 17:39:53 +02:00
|
|
|
%td= link_to('X', url_for(controller: 'dossiers', action: :destroy, id: dossier.id), 'data-method' => :delete, class: 'btn-sm btn-danger') if @liste == "brouillon"
|
2015-11-26 12:29:34 +01:00
|
|
|
|
2016-01-08 11:39:04 +01:00
|
|
|
= smart_listing.paginate
|
|
|
|
|
|
|
|
- else
|
|
|
|
%h4.center
|
|
|
|
Aucun dossier
|