style(piece_justificative): use DSFR Téléchargement de fichiers for instructeurs & experts

This commit is contained in:
Colin Darie 2022-11-07 16:09:15 +01:00
parent e1270d5ffe
commit ed1c6ec515
5 changed files with 39 additions and 34 deletions

View file

@ -59,7 +59,7 @@
}
}
ul {
:not(.fr-downloads-group) > ul {
list-style-type: disc;
list-style-position: inside;
padding-left: $default-padding;

View file

@ -1,6 +1,6 @@
@import "constants";
.rich-text {
.rich-text:not(.piece_justificative) {
i {
font-style: italic;
}

View file

@ -1,8 +1,11 @@
.attachment-link{ id: dom_id(attachment, :show) }
.attachment-link.fr-download{ id: dom_id(attachment, :show) }
%p
- if should_display_link?
= link_to url_for(attachment.blob), target: '_blank', rel: 'noopener', title: "Télécharger la pièce jointe" do
%span.icon.attached
= link_to url_for(attachment.blob), download: "", class: "fr-download__link", title: "Télécharger la pièce jointe" do
= attachment.filename.to_s
%span.fr-download__detail
= helpers.download_details(attachment)
- if !attachment.virus_scanner.started?
(ce fichier na pas été analysé par notre antivirus, téléchargez-le avec précaution)

View file

@ -1,6 +1,8 @@
- pj = champ.piece_justificative_file
- if pj.attached?
.fr-downloads-group
%ul
- pj.attachments.each do |attachment|
= render Attachment::ShowComponent.new(attachment:)
%li= render Attachment::ShowComponent.new(attachment:)
- else
Pièce justificative non fournie

View file

@ -15,7 +15,7 @@
- else
%td.libelle{ class: repetition ? 'padded' : '' }
= "#{c.libelle} :"
%td.rich-text
%td.rich-text{ class: c.type_champ }
%div{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
- case c.type_champ
- when TypeDeChamp.type_champs.fetch(:carte)