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-type: disc;
list-style-position: inside; list-style-position: inside;
padding-left: $default-padding; padding-left: $default-padding;

View file

@ -1,6 +1,6 @@
@import "constants"; @import "constants";
.rich-text { .rich-text:not(.piece_justificative) {
i { i {
font-style: italic; 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? - if should_display_link?
= link_to url_for(attachment.blob), target: '_blank', rel: 'noopener', title: "Télécharger la pièce jointe" do = link_to url_for(attachment.blob), download: "", class: "fr-download__link", title: "Télécharger la pièce jointe" do
%span.icon.attached
= attachment.filename.to_s = attachment.filename.to_s
%span.fr-download__detail
= helpers.download_details(attachment)
- if !attachment.virus_scanner.started? - if !attachment.virus_scanner.started?
(ce fichier na pas été analysé par notre antivirus, téléchargez-le avec précaution) (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 - pj = champ.piece_justificative_file
- if pj.attached? - if pj.attached?
.fr-downloads-group
%ul
- pj.attachments.each do |attachment| - pj.attachments.each do |attachment|
= render Attachment::ShowComponent.new(attachment:) %li= render Attachment::ShowComponent.new(attachment:)
- else - else
Pièce justificative non fournie Pièce justificative non fournie

View file

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