demarches-normaliennes/app/views/dossiers/_infos_pieces_jointes.html.haml

50 lines
2.6 KiB
Text
Raw Normal View History

#pieces_justificatives
.row
- if @facade.procedure.cerfa_flag?
.col-md-12.col-lg-12#piece_justificative_0
.row.piece-row
.col-md-6.col-lg-6.piece-label= 'Formulaire'
.col-md-1.col-lg-1.comments-off= "-"
.col-md-5.col-lg-5
- if @facade.dossier.cerfa_available?
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
%span{style:'margin-left:12px'}
\-
%a.btn.fa.fa-timer{style:'color: black; padding-top: 0',
"data-target" => "#PJmodal",
"data-toggle" => "modal",
:type => "button",
"data-modal_title" => 'formulaires',
"data-modal_index" => 'cerfa'}
- else
= 'Pièce non fournie'
.row
.col-md-12.col-lg-12
- @facade.dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
.row.piece-row
.col-md-12.col-lg-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" }
.row
.col-md-6.col-lg-6= type_de_piece_justificative.libelle
.col-md-6.col-lg-6
- if type_de_piece_justificative.api_entreprise
%span.text-success Nous l'avons récupéré pour vous.
- elsif !(@pj = @facade.dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)).nil?
-#- if user_signed_in?
-# = 'Pièce fournie'
-#- elsif gestionnaire_signed_in?
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
%span{style:'margin-left:12px'}
\-
%a.btn.fa.fa-timer{style:'color: black; padding-top: 0',
"data-target" => "#PJmodal",
"data-toggle" => "modal",
:type => "button",
"data-modal_title" => type_de_piece_justificative.libelle,
"data-modal_index" => "type_de_pj_#{type_de_piece_justificative.id}"}
- else
= 'Pièce non fournie'
-#- if gestionnaire_signed_in?
= render partial: '/dossiers/modal_historique'