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

170 lines
7.7 KiB
Text
Raw Normal View History

2017-04-06 15:32:05 +02:00
.row
2017-03-14 13:54:31 +01:00
.col-xs-12
2016-11-28 18:34:31 +01:00
- if @facade.procedure.for_individual?
.row.title-row
2017-04-06 15:32:05 +02:00
.col-xs-4.split-hr
2018-05-30 18:58:09 +02:00
.col-xs-4.dossier-title= t('utils.depositaire')
2017-04-06 15:32:05 +02:00
.col-xs-4.split-hr
2016-11-28 18:34:31 +01:00
.row
2017-04-06 15:32:05 +02:00
.col-xs-6.depositaire-label Civilité
.col-xs-1.comments-off= "-"
.col-xs-5.depositaire-info= @facade.individual.gender
2016-11-28 18:34:31 +01:00
.row
2017-04-06 15:32:05 +02:00
.col-xs-6.depositaire-label Nom
.col-xs-1.comments-off= "-"
.col-xs-5.depositaire-info= @facade.individual.nom
2016-11-28 18:34:31 +01:00
.row
2017-04-06 15:32:05 +02:00
.col-xs-6.depositaire-label Prénom
.col-xs-1.comments-off= "-"
.col-xs-5.despositaire-info= @facade.individual.prenom
2017-02-13 15:46:28 +01:00
.row
2017-04-06 15:32:05 +02:00
.col-xs-6.depositaire-label Date de naissance
.col-xs-1.comments-off= "-"
.col-xs-4.depositaire-info= @facade.individual.birthdate&.strftime("%d/%m/%Y")
.row.margin-top-20
2016-11-28 18:34:31 +01:00
2018-01-11 19:04:39 +01:00
- if @facade.champs.present?
- @facade.champs.each do |champ|
2017-04-04 15:28:39 +02:00
- next if champ.type_champ == 'explication'
- if champ.type_champ == 'header_section'
.row.title-row.margin-top-40
2017-04-06 15:32:05 +02:00
.col-xs-3.split-hr
2018-05-30 18:58:09 +02:00
.col-xs-6.dossier-title= champ.libelle
2017-04-06 15:32:05 +02:00
.col-xs-3.split-hr
- else
2016-11-28 18:34:31 +01:00
.row
2017-04-06 15:32:05 +02:00
.col-xs-6.depositaire-label= champ.libelle
2017-03-28 15:09:35 +02:00
.col-xs-1.comments-off
= "-"
2017-04-06 15:32:05 +02:00
.col-xs-5.depositaire-info{ id: "champ-#{champ.id}-value" }
- if champ.decorate.value.present? || champ.piece_justificative_file.attached?
2017-03-28 15:09:35 +02:00
- if champ.type_champ == 'dossier_link'
- dossier = Dossier.includes(:procedure).find_by(id: champ.decorate.value)
- if dossier
= link_to("Dossier #{dossier.id}", modifier_dossier_path(dossier), target: '_blank')
%br
= sanitize(dossier.text_summary)
2017-03-28 15:09:35 +02:00
- else
Pas de dossier associé
- elsif champ.type_champ == 'piece_justificative'
= render partial: "shared/champs/piece_justificative/pj_link", locals: { champ: champ, user_can_upload: true }
- elsif champ.type_champ == 'textarea'
= simple_format(champ.decorate.value)
2017-03-28 15:09:35 +02:00
- else
2017-07-12 13:47:49 +02:00
= sanitize(champ.decorate.value)
2016-11-28 18:34:31 +01:00
2017-04-06 15:32:05 +02:00
.row
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.count > 0
2017-03-15 17:48:35 +01:00
.col-xs-12
.row.title-row
2017-04-06 15:32:05 +02:00
.col-xs-4.split-hr
2018-05-30 18:58:09 +02:00
.col-xs-4.dossier-title= t('utils.pieces')
2017-04-06 15:32:05 +02:00
.col-xs-4.split-hr
.col-xs-12#pieces-justificatives.margin-bot-40
.row
- if @facade.procedure.cerfa_flag?
2017-02-14 17:08:14 +01:00
.col-xs-12#piece_justificative_0
.row.piece-row
2017-02-14 17:08:14 +01:00
.col-xs-6.depositaire-label= 'Formulaire'
2017-03-15 17:48:35 +01:00
.col-xs-1.comments-off= "-"
2017-02-14 17:08:14 +01:00
.col-xs-5.despositaire-info
- if @facade.dossier.cerfa_available?
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
%span{ style: 'margin-left: 12px;' }
\-
= link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#pj-modal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => 'cerfa' do
%span.fa.fa-clock-o
- else
2017-04-06 16:33:53 +02:00
Pièce non fournie
.row
2017-02-14 17:08:14 +01:00
.col-xs-12
2016-12-22 10:55:27 +01:00
- @facade.types_de_pieces_justificatives.each do |type_de_piece_justificative|
.row.piece-row
2017-02-14 17:08:14 +01:00
.col-xs-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" }
.row
2017-04-06 15:32:05 +02:00
.col-xs-6.depositaire-label= type_de_piece_justificative.libelle
.col-xs-1.comments-off= "-"
.col-xs-5.despositaire-info
- if type_de_piece_justificative.api_entreprise
%span.text-success Nous l'avons récupéré pour vous.
2018-01-11 19:08:04 +01:00
- elsif (@pj = @facade.dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)).present?
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
%span{ style: 'margin-left: 12px;' }
\-
- if @facade.dossier.pieces_justificatives.where(type_de_piece_justificative_id: type_de_piece_justificative.id).count > 1
= link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#pj-modal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => "type_de_pj_#{type_de_piece_justificative.id}" do
%span.fa.fa-clock-o
- else
2017-04-06 16:33:53 +02:00
Pièce non fournie
2018-01-11 19:04:39 +01:00
- if !@facade.dossier.read_only?
- if user_signed_in? && (current_user.owns_or_invite?(@facade.dossier))
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.size > 0
.row
2017-03-15 17:48:35 +01:00
.col-xs-4
%a#maj_pj.action{ "data-target" => "#upload-pj-modal", "data-toggle" => "modal", :type => "button" }
2017-03-15 17:48:35 +01:00
.col-xs-4.action
Modifier les documents
%br
= render partial: 'users/recapitulatif/modal_upload_pj'
2017-03-15 17:48:35 +01:00
.col-xs-4
- if gestionnaire_signed_in?
#pj-modal.modal.fade{ "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1" }
2017-04-06 19:10:25 +02:00
.modal-dialog.modal-lg{ :role => "document" }
.modal-content
.modal-header
2017-04-06 19:10:25 +02:00
%button.close{ "aria-label" => "Close", "data-dismiss" => "modal", :type => "button" }
%span{ "aria-hidden" => "true" } ×
%h4#myModalLabel.modal-title
Historique des
%span#pj-modal-title
.modal-body
%table.table
%thead
%th
2017-04-26 15:13:50 +02:00
Usager
%th
Date d'envoi
%th
Lien
%thead.tr-content#cerfa
- if @facade.procedure.cerfa_flag?
- if @facade.dossier.cerfa_available?
- @facade.cerfas_ordered.each do |cerfa|
%tr
2016-12-23 16:58:06 +01:00
%td.col-md-6.col-sm-6.col-xs-6.col-lg-4
= cerfa.user.email
2016-12-23 16:58:06 +01:00
%td.col-md-6.col-sm-6.col-xs-6.col-lg-4
= cerfa.created_at
2016-12-23 16:58:06 +01:00
%td.col-md-6.col-sm-6.col-xs-6.col-lg-4
2017-04-06 19:10:25 +02:00
= link_to 'Récupérer', cerfa.content_url, { target: :blank }
- @facade.dossier.types_de_piece_justificative.each do |type_de_piece_justificative|
%tbody.tr-content{ id: "type_de_pj_#{type_de_piece_justificative.id}" }
- @facade.dossier.retrieve_all_piece_justificative_by_type(type_de_piece_justificative.id).each do |piece_justificative|
%tr
2016-12-23 16:58:06 +01:00
%td.col-md-6.col-sm-6.col-xs-6.col-lg-4
= piece_justificative.user.email
2016-12-23 16:58:06 +01:00
%td.col-md-6.col-sm-6.col-xs-6.col-lg-4
= piece_justificative.created_at
2016-12-23 16:58:06 +01:00
%td.col-md-6.col-sm-6.col-xs-6.col-lg-4
2017-04-06 19:10:25 +02:00
= link_to 'Récupérer', piece_justificative.content_url, { target: :blank }
.modal-footer
2016-11-28 18:34:31 +01:00
2017-04-06 19:10:25 +02:00
#modalCommentairesDossierParChamp.modal.fade{ "tabindex" => -1, "role" => "dialog" }
.modal-dialog{ "role" => "document" }
2016-11-14 18:00:26 +01:00
.modal-content
.modal-header
2017-04-06 19:10:25 +02:00
%button.close{ "data-dismiss" => "modal", "aria-label" => "Fermer" }
%span{ "aria-hidden" => true }
2016-11-14 18:00:26 +01:00
×
.modal-title
Commentaires
.modal-body
%p
Chargement des commentaires en cours...
.modal-footer
2017-04-06 19:10:25 +02:00
%button.btn.btn-primary{ "data-dismiss" => "modal" }
2016-11-14 18:00:26 +01:00
Fermer