Skip to content

Commit

Permalink
[Fix #1016] display notifications on PJ
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagn committed Dec 7, 2017
1 parent 79d804c commit aa99ac2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/new_gestionnaire/avis/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
.accompagnateur-title Pièces jointes
.card
= render partial: "new_gestionnaire/dossiers/pieces_jointes", locals: { dossier: @dossier }
= render partial: "new_gestionnaire/dossiers/pieces_jointes", locals: { dossier: @dossier, follow: nil }
13 changes: 10 additions & 3 deletions app/views/new_gestionnaire/dossiers/_pieces_jointes.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%table.table.vertical
%table.table.vertical.dossier-champs
%tbody
- if dossier.procedure.cerfa_flag?
%tr
Expand All @@ -8,13 +8,20 @@
= link_to "Télécharger", @dossier.cerfa.last.content_url, class: "link", target: :blank
- else
Pièce non fournie
%td


- dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
- pj = dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
%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: "link", target: :blank
= link_to "Télécharger", pj.content_url, class: "link #{updated_at_bg_class(follow&.demande_seen_at, pj.updated_at)}", target: :blank
- else
Pièce non fournie
%td.updated-at
- if pj.present?
%span{ class: updated_at_bg_class(follow&.demande_seen_at, pj.updated_at) }
modifié le
= pj.updated_at.strftime("%d/%m/%Y à %H:%M")
2 changes: 1 addition & 1 deletion app/views/new_gestionnaire/dossiers/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
.accompagnateur-title Pièces jointes
.card
= render partial: "pieces_jointes", locals: { dossier: @dossier }
= render partial: "pieces_jointes", locals: { dossier: @dossier, follow: @follow }

0 comments on commit aa99ac2

Please sign in to comment.