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

33 lines
1.4 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

%table.table.vertical.pj.dossier-champs
%tbody
- 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, rel: :noopener
- if pjs.present?
%br
%span.dropdown
%button.button.dropdown-button
anciennes versions
.dropdown-content.fade-in-down
%ul.dropdown-items
- pjs.each do |pj|
%li
= link_to pj.content_url, { target: :blank, rel: :noopener } do
%span.filename= display_pj_filename(pj)
%span
ajoutée le #{try_format_datetime(pj.created_at)}
- 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
= try_format_datetime(pj.updated_at)