demarches-normaliennes/app/views/new_gestionnaire/dossiers/_pieces_jointes.html.haml

44 lines
1.7 KiB
Text
Raw Normal View History

%table.table.vertical.pj.dossier-champs
%tbody
- if dossier.procedure.cerfa_flag?
%tr
%th Formulaire :
%td
- if @dossier.cerfa_available?
= link_to "Télécharger", @dossier.cerfa.last.content_url, class: "link", target: :blank
- else
Pièce non fournie
%td
- dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
- pjs = dossier.retrieve_all_piece_justificative_by_type(type_de_piece_justificative.id).to_ary.dup
- pj = pjs.shift if pjs.present?
%tr
%th= "#{type_de_piece_justificative.libelle} :"
- if pj
%td
%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
- if pjs.present?
%br
%span.button.dropdown
anciennes versions
.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
ajoutée le #{pj.created_at.localtime.strftime('%d/%m/%Y à %H:%M')}
- else
%td Pièce non fournie
%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")