diff --git a/app/assets/images/icons/attachment.svg b/app/assets/images/icons/attachment.svg new file mode 100644 index 000000000..75d78782d --- /dev/null +++ b/app/assets/images/icons/attachment.svg @@ -0,0 +1 @@ +Shape \ No newline at end of file diff --git a/app/assets/stylesheets/new_design/icons.scss b/app/assets/stylesheets/new_design/icons.scss index a22cd9afd..fe7d8add2 100644 --- a/app/assets/stylesheets/new_design/icons.scss +++ b/app/assets/stylesheets/new_design/icons.scss @@ -48,4 +48,8 @@ i { &.bubble { background-image: image-url("icons/bubble.svg"); } + + &.attachment { + background-image: image-url("icons/attachment.svg"); + } } diff --git a/app/assets/stylesheets/new_design/messagerie.scss b/app/assets/stylesheets/new_design/messagerie.scss index d597ac165..eb5901dfe 100644 --- a/app/assets/stylesheets/new_design/messagerie.scss +++ b/app/assets/stylesheets/new_design/messagerie.scss @@ -38,4 +38,8 @@ .date { float: right; } + + .attachment-link { + margin-top: $default-spacer; + } } diff --git a/app/views/new_gestionnaire/dossiers/messagerie.html.haml b/app/views/new_gestionnaire/dossiers/messagerie.html.haml index 32db9b20c..96699c81c 100644 --- a/app/views/new_gestionnaire/dossiers/messagerie.html.haml +++ b/app/views/new_gestionnaire/dossiers/messagerie.html.haml @@ -14,6 +14,11 @@ %span.guest Invité %span.date= I18n.l(commentaire.created_at.localtime, format: '%H:%M le %d/%m/%Y') %p= sanitize(commentaire.body) + - if file = commentaire.piece_justificative + .attachment-link + = link_to file.content_url, class: "button", target: "_blank", title: "Télécharger" do + %i.attachment + = file.original_filename = form_for(Commentaire.new, url: commentaire_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' }) do |f| = f.text_area :body, rows: 5, placeholder: 'Répondre ici', required: true diff --git a/app/views/root/patron.html.haml b/app/views/root/patron.html.haml index 5d295de01..438f8de64 100644 --- a/app/views/root/patron.html.haml +++ b/app/views/root/patron.html.haml @@ -13,6 +13,7 @@ %i.edit %i.in-progress %i.bubble + %i.attachment %h1 Formulaires