2018-01-11 19:04:39 +01:00
|
|
|
- if smart_listing.present?
|
2017-04-12 11:12:05 +02:00
|
|
|
%table#dossiers-list.table
|
2016-01-08 11:39:04 +01:00
|
|
|
%thead
|
2016-12-23 16:58:06 +01:00
|
|
|
%th#sort-id.col-md-1.col-lg-1.col-sm-1.col-xs-1= smart_listing.sortable 'Numéro', 'id'
|
2017-02-14 17:08:14 +01:00
|
|
|
%th#sort-libelle.col-xs-5= smart_listing.sortable 'Procédure', 'procedure.libelle'
|
|
|
|
%th#sort-state.col-xs-2= smart_listing.sortable 'État', 'state'
|
|
|
|
%th#sort-updated.col-xs-2= smart_listing.sortable 'Date de mise à jour', 'updated_at'
|
2016-10-25 17:39:53 +02:00
|
|
|
- if @liste == "brouillon"
|
2017-02-14 17:08:14 +01:00
|
|
|
%th.col-xs-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
|
|
|
|
2018-01-11 19:04:39 +01:00
|
|
|
- dossier_url = users_dossiers_invite_path(id: invite.id) if invite.present?
|
2016-11-08 14:08:16 +01:00
|
|
|
- if invite.nil?
|
2018-01-11 19:04:39 +01:00
|
|
|
- dossier_url = users_dossier_recapitulatif_path(dossier) if !dossier.brouillon?
|
2016-11-08 14:08:16 +01:00
|
|
|
- dossier_url = users_dossier_description_path(dossier) if dossier.brouillon?
|
|
|
|
|
2017-04-06 19:10:25 +02: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
|
|
|
|
2017-04-06 19:10:25 +02:00
|
|
|
%td{ id: "dossier_#{dossier.id}_state" }= dossier.display_state
|
2016-01-08 11:39:04 +01:00
|
|
|
%td= dossier.last_update
|
2017-10-19 11:20:12 +02:00
|
|
|
%td= link_to('X', url_for(controller: 'dossiers', action: :destroy, id: dossier.id), 'data-confirm' => "Voulez-vous supprimer la brouillon ?", '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
|
2017-01-02 10:48:47 +01:00
|
|
|
= smart_listing.pagination_per_page_links
|
|
|
|
%br
|
2016-01-08 11:39:04 +01:00
|
|
|
|
|
|
|
- else
|
|
|
|
%h4.center
|
|
|
|
Aucun dossier
|