demarches-normaliennes/app/views/admin/procedures/_list.html.haml

39 lines
1.8 KiB
Text
Raw Normal View History

2018-01-11 19:04:39 +01:00
- if smart_listing.present?
%table.table#dossiers-list
2016-01-07 15:29:29 +01:00
%thead
%th#ID= smart_listing.sortable 'ID', 'id'
%th#libelle= smart_listing.sortable 'Libellé', 'libelle'
- if @active_class
2017-04-06 15:59:42 +02:00
%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'
2017-04-06 15:59:42 +02:00
%th Actions
2016-01-07 15:29:29 +01:00
- @procedures.each do |procedure|
2018-12-27 13:29:39 +01:00
- procedure = procedure
- admin_procedure_href = admin_procedure_path(procedure)
%tr{ id: "tr_dossier_#{procedure.id}", data: { href: admin_procedure_href } }
%td= link_to(procedure.id, admin_procedure_href)
%td.col-xs-6= link_to(procedure.libelle, admin_procedure_href)
- if procedure.publiee?
2018-08-14 15:17:22 +02:00
%td.procedure-lien= link_to(procedure_lien(procedure), procedure_lien(procedure))
2019-12-04 15:45:06 +01:00
- if procedure.locked?
%td= link_to(procedure.published_at.present? ? try_format_datetime(procedure.published_at) : "", admin_procedure_href)
- else
%td= link_to(try_format_datetime(procedure.created_at), admin_procedure_href)
2016-06-20 17:37:04 +02:00
%td
= link_to('Cloner', admin_procedure_clone_path(procedure.id), data: { method: :put }, class: 'btn-sm btn-primary clone-btn')
2019-12-04 15:45:06 +01:00
- if !procedure.locked?
2019-06-24 17:00:10 +02:00
= link_to('X', url_for(controller: 'admin/procedures', action: :destroy, id: procedure.id), data: { method: :delete, confirm: "Confirmez-vous la suppression de la démarche ? \n\n Attention : toute suppression est définitive et sappliquera aux éventuels autres administrateurs de cette démarche !" }, class: 'btn-sm btn-danger')
2016-01-07 15:29:29 +01:00
= smart_listing.paginate
= smart_listing.pagination_per_page_links
%br
2016-01-07 15:29:29 +01:00
- else
%h4.center
2018-09-05 14:48:42 +02:00
Aucune démarche