40 lines
1.4 KiB
Text
40 lines
1.4 KiB
Text
- if smart_listing.present?
|
|
%table.table#dossiers-list
|
|
%thead
|
|
%th#ID= smart_listing.sortable 'ID', 'id'
|
|
%th#libelle= smart_listing.sortable 'Libellé', 'libelle'
|
|
- if @active_class
|
|
%th Lien
|
|
- if @active_class || @archived_class
|
|
%th#published_at= smart_listing.sortable 'Date publication', 'published_at'
|
|
- else
|
|
%th#created_at= smart_listing.sortable 'Date création', 'created_at'
|
|
%th Actions
|
|
|
|
- @procedures.each do |procedure|
|
|
- procedure = procedure.decorate
|
|
%tr{ id: "tr_dossier_#{procedure.id}", 'data-dossier_url' => admin_procedure_path(id: procedure.id) }
|
|
%td= procedure.id
|
|
%td.col-xs-6
|
|
= procedure.libelle
|
|
- if @active_class
|
|
%td.procedure-lien= link_to procedure.lien, procedure.lien, 'data-method' => :get
|
|
- if @active_class || @archived_class
|
|
%td
|
|
= procedure.published_at_fr
|
|
- else
|
|
%td
|
|
= procedure.created_at_fr
|
|
%td
|
|
= link_to('Cloner', admin_procedure_clone_path(procedure.id), 'data-method' => :put, class: 'btn-sm btn-primary clone-btn')
|
|
- if !procedure.publiee_ou_archivee?
|
|
= link_to('X', url_for(controller: 'admin/procedures', action: :destroy, id: procedure.id), 'data-method' => :delete, class: 'btn-sm btn-danger')
|
|
|
|
= smart_listing.paginate
|
|
= smart_listing.pagination_per_page_links
|
|
%br
|
|
|
|
|
|
- else
|
|
%h4.center
|
|
Aucune procédure
|