2017-12-07 16:11:08 +01:00
|
|
|
|
%table.table.vertical.pj.dossier-champs
|
2017-10-16 17:01:12 +02:00
|
|
|
|
%tbody
|
|
|
|
|
- dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
|
2017-12-07 16:11:08 +01:00
|
|
|
|
- pjs = dossier.retrieve_all_piece_justificative_by_type(type_de_piece_justificative.id).to_ary.dup
|
|
|
|
|
- pj = pjs.shift if pjs.present?
|
2017-10-16 17:01:12 +02:00
|
|
|
|
%tr
|
|
|
|
|
%th= "#{type_de_piece_justificative.libelle} :"
|
2017-12-07 16:11:08 +01:00
|
|
|
|
- if pj
|
2017-12-07 11:52:35 +01:00
|
|
|
|
%td
|
2017-12-07 16:11:08 +01:00
|
|
|
|
%span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) }
|
|
|
|
|
= display_pj_filename(pj)
|
|
|
|
|
·
|
|
|
|
|
= link_to "Télécharger", pj.content_url, class: "link", target: :blank
|
2017-12-07 11:52:35 +01:00
|
|
|
|
- if pjs.present?
|
2017-12-07 16:11:08 +01:00
|
|
|
|
%br
|
2018-09-11 17:51:44 +02:00
|
|
|
|
%span.dropdown
|
|
|
|
|
%button.button.dropdown-button
|
|
|
|
|
anciennes versions
|
2017-12-07 11:52:35 +01:00
|
|
|
|
.dropdown-content.fade-in-down
|
|
|
|
|
%ul.dropdown-items
|
|
|
|
|
- pjs.each do |pj|
|
|
|
|
|
%li
|
|
|
|
|
= link_to pj.content_url, { target: :blank } do
|
|
|
|
|
%span.filename= display_pj_filename(pj)
|
|
|
|
|
%span
|
2017-12-07 16:11:08 +01:00
|
|
|
|
ajoutée le #{pj.created_at.localtime.strftime('%d/%m/%Y à %H:%M')}
|
2017-12-07 11:52:35 +01:00
|
|
|
|
- else
|
|
|
|
|
%td Pièce non fournie
|
2017-12-07 16:11:08 +01:00
|
|
|
|
%td.updated-at
|
|
|
|
|
- if pj
|
|
|
|
|
%span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) }
|
|
|
|
|
modifié le
|
|
|
|
|
= pj.updated_at.localtime.strftime("%d/%m/%Y à %H:%M")
|