Pieces justificatives on dossier page

This commit is contained in:
Mathieu Magnin 2017-07-06 17:52:16 +02:00
parent 8aed0d7aef
commit 373447a19f
2 changed files with 30 additions and 0 deletions

View file

@ -1,3 +1,4 @@
@import "colors";
@import "constants";
@import "mixins";
@import "placeholders";
@ -14,6 +15,10 @@ h1 {
font-weight: bold;
}
a {
color: $blue;
}
.container {
@include horizontal-padding($default-padding);
max-width: $page-width + 2 * $default-padding;

View file

@ -15,3 +15,28 @@
= "#{c.libelle} :"
%td
= c.value
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
.card.featured
.card-title Pièces jointes
%table.table
%tbody
- if @dossier.procedure.cerfa_flag?
%tr
%th Formulaire :
%td
- if @dossier.cerfa_available?
= link_to "Télécharger", @dossier.cerfa.last.content_url, class: "button", target: :blank
- else
Pièce non fournie
- @dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
%tr
%th= "#{type_de_piece_justificative.libelle} :"
%td
- pj = @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
- if pj.present?
= link_to "Télécharger", pj.content_url, class: "button", target: :blank
- else
Pièce non fournie