Show pieces justificatives in messagerie

This commit is contained in:
Mathieu Magnin 2017-09-12 15:27:57 +02:00
parent 581da1921e
commit 9c8061d5a4
5 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1 @@
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><title>Shape</title><path d="M18.34 7.287L7.038 17.73a3.358 3.358 0 0 1-2.292.877c-.867 0-1.68-.312-2.291-.877a2.867 2.867 0 0 1-.948-2.118c0-.801.337-1.554.948-2.119L14.94 1.954c.785-.725 2.159-.724 2.944 0 .812.751.812 1.972 0 2.722L6.675 15.036c-.33.306-.912.307-1.243 0a.779.779 0 0 1-.258-.574c0-.217.092-.422.258-.575l8.08-7.468a.669.669 0 0 0 .221-.492.67.67 0 0 0-.221-.494.816.816 0 0 0-1.065.001l-8.08 7.469c-.451.416-.699.969-.699 1.559s.248 1.143.698 1.56c.9.83 2.473.832 3.375 0L18.95 5.66C19.627 5.035 20 4.202 20 3.315c0-.886-.373-1.72-1.05-2.345A3.718 3.718 0 0 0 16.412 0c-.959 0-1.86.344-2.538.97L1.389 12.51C.493 13.336 0 14.44 0 15.612c0 1.173.493 2.276 1.39 3.103C2.283 19.544 3.475 20 4.745 20s2.463-.456 3.359-1.284l11.3-10.444a.667.667 0 0 0 .222-.492c0-.187-.08-.361-.222-.493a.818.818 0 0 0-1.065 0z" fill-rule="nonzero" fill="#4393F3"/></svg>

After

Width:  |  Height:  |  Size: 952 B

View file

@ -48,4 +48,8 @@ i {
&.bubble {
background-image: image-url("icons/bubble.svg");
}
&.attachment {
background-image: image-url("icons/attachment.svg");
}
}

View file

@ -38,4 +38,8 @@
.date {
float: right;
}
.attachment-link {
margin-top: $default-spacer;
}
}

View file

@ -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

View file

@ -13,6 +13,7 @@
%i.edit
%i.in-progress
%i.bubble
%i.attachment
%h1 Formulaires