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 13, 2017
1 parent 09a07b0 commit be04350
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 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 }
24 changes: 17 additions & 7 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.pj
%table.table.vertical.pj.dossier-champs
%tbody
- if dossier.procedure.cerfa_flag?
%tr
Expand All @@ -8,17 +8,22 @@
= 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|
- pjs = dossier.retrieve_all_piece_justificative_by_type(type_de_piece_justificative.id).to_ary.dup
- pj = pjs.shift if pjs.present?
%tr
%th= "#{type_de_piece_justificative.libelle} :"
- pjs = dossier.retrieve_all_piece_justificative_by_type(type_de_piece_justificative.id).to_ary.dup
- if pjs.present?
- first_pj = pjs.pop
%td= display_pj_filename(first_pj)
%td= link_to "Télécharger", first_pj.content_url, class: "link", target: :blank
- if pj
%td
%span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) }
= display_pj_filename(pj)
·
= link_to "Télécharger", pj.content_url, class: "link", target: :blank
- if pjs.present?
%br
%span.button.dropdown
anciennes versions
.dropdown-content.fade-in-down
Expand All @@ -28,6 +33,11 @@
= link_to pj.content_url, { target: :blank } do
%span.filename= display_pj_filename(pj)
%span
ajoutée le #{pj.created_at.localtime.strftime('%d/%m %H:%M')}
ajoutée le #{pj.created_at.localtime.strftime('%d/%m/%Y à %H:%M')}
- else
%td Pièce non fournie
%td.updated-at
- if pj
%span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) }
modifié le
= pj.updated_at.localtime.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, demande_seen_at: @demande_seen_at }

0 comments on commit be04350

Please sign in to comment.