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= "-"
|
2018-04-03 16:38:54 +02:00
|
|
|
|
.col-xs-4.depositaire-info= @facade.individual.birthdate&.strftime("%d/%m/%Y")
|
2016-12-28 11:55:39 +01:00
|
|
|
|
.row.margin-top-20
|
2016-11-28 18:34:31 +01:00
|
|
|
|
|
2018-01-11 19:04:39 +01:00
|
|
|
|
- if @facade.champs.present?
|
2016-12-02 16:33:31 +01:00
|
|
|
|
- @facade.champs.each do |champ|
|
2017-04-04 15:28:39 +02:00
|
|
|
|
- next if champ.type_champ == 'explication'
|
2016-12-02 16:33:31 +01:00
|
|
|
|
- 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
|
2016-12-02 16:33:31 +01:00
|
|
|
|
- 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-01-09 17:12:11 +01:00
|
|
|
|
= "-"
|
2017-04-06 15:32:05 +02:00
|
|
|
|
.col-xs-5.depositaire-info{ id: "champ-#{champ.id}-value" }
|
2018-01-30 19:17:16 +01:00
|
|
|
|
- if champ.decorate.value.present? || champ.piece_justificative_file.attached?
|
2017-03-28 15:09:35 +02:00
|
|
|
|
- if champ.type_champ == 'dossier_link'
|
2017-04-13 15:42:54 +02:00
|
|
|
|
- dossier = Dossier.includes(:procedure).find_by(id: champ.decorate.value)
|
2017-04-25 09:47:13 +02:00
|
|
|
|
- if dossier
|
2018-02-21 18:36:06 +01:00
|
|
|
|
= link_to("Dossier #{dossier.id}", modifier_dossier_path(dossier), target: '_blank')
|
2017-04-13 15:47:42 +02:00
|
|
|
|
%br
|
2018-01-20 15:19:43 +01:00
|
|
|
|
= sanitize(dossier.text_summary)
|
2017-03-28 15:09:35 +02:00
|
|
|
|
- else
|
2017-04-25 09:47:13 +02:00
|
|
|
|
Pas de dossier associé
|
2018-01-30 19:17:16 +01:00
|
|
|
|
- elsif champ.type_champ == 'piece_justificative'
|
2018-05-11 14:59:20 +02:00
|
|
|
|
= render partial: "shared/champs/piece_justificative/pj_link", locals: { champ: champ, user_can_upload: true }
|
2018-03-15 10:55:10 +01:00
|
|
|
|
- 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
|
2016-12-22 10:52:04 +01:00
|
|
|
|
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.count > 0
|
2017-03-15 17:48:35 +01:00
|
|
|
|
.col-xs-12
|
2016-12-07 13:57:55 +01:00
|
|
|
|
.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
|
2016-12-22 10:52:04 +01:00
|
|
|
|
|
2017-04-12 11:12:05 +02:00
|
|
|
|
.col-xs-12#pieces-justificatives.margin-bot-40
|
2016-12-07 13:57:55 +01:00
|
|
|
|
.row
|
|
|
|
|
- if @facade.procedure.cerfa_flag?
|
2017-02-14 17:08:14 +01:00
|
|
|
|
.col-xs-12#piece_justificative_0
|
2016-12-07 13:57:55 +01:00
|
|
|
|
.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
|
2016-12-07 13:57:55 +01:00
|
|
|
|
- if @facade.dossier.cerfa_available?
|
|
|
|
|
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
|
2017-04-06 19:58:11 +02:00
|
|
|
|
%span{ style: 'margin-left: 12px;' }
|
2016-12-07 13:57:55 +01:00
|
|
|
|
\-
|
2017-04-12 11:12:05 +02:00
|
|
|
|
= link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#pj-modal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => 'cerfa' do
|
2016-12-07 13:57:55 +01:00
|
|
|
|
%span.fa.fa-clock-o
|
|
|
|
|
- else
|
2017-04-06 16:33:53 +02:00
|
|
|
|
Pièce non fournie
|
2016-12-07 13:57:55 +01:00
|
|
|
|
.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|
|
2016-12-07 13:57:55 +01:00
|
|
|
|
.row.piece-row
|
2017-02-14 17:08:14 +01:00
|
|
|
|
.col-xs-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" }
|
2016-12-07 13:57:55 +01:00
|
|
|
|
.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
|
2016-12-07 13:57:55 +01:00
|
|
|
|
- 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?
|
2016-12-07 13:57:55 +01:00
|
|
|
|
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
|
2017-04-06 19:58:11 +02:00
|
|
|
|
%span{ style: 'margin-left: 12px;' }
|
2016-12-07 13:57:55 +01:00
|
|
|
|
\-
|
2017-01-02 11:44:21 +01:00
|
|
|
|
- if @facade.dossier.pieces_justificatives.where(type_de_piece_justificative_id: type_de_piece_justificative.id).count > 1
|
2017-04-12 11:12:05 +02:00
|
|
|
|
= 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
|
2017-01-02 11:44:21 +01:00
|
|
|
|
%span.fa.fa-clock-o
|
2016-12-07 13:57:55 +01:00
|
|
|
|
- else
|
2017-04-06 16:33:53 +02:00
|
|
|
|
Pièce non fournie
|
2016-12-22 10:52:04 +01:00
|
|
|
|
|
2018-01-11 19:04:39 +01:00
|
|
|
|
- if !@facade.dossier.read_only?
|
2018-05-30 18:31:02 +02:00
|
|
|
|
- if user_signed_in? && (current_user.owns_or_invite?(@facade.dossier))
|
2016-12-07 13:57:55 +01:00
|
|
|
|
- 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
|
2017-04-12 11:12:05 +02:00
|
|
|
|
%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
|
2016-12-07 13:57:55 +01:00
|
|
|
|
Modifier les documents
|
|
|
|
|
%br
|
2016-12-07 16:59:35 +01:00
|
|
|
|
= render partial: 'users/recapitulatif/modal_upload_pj'
|
2017-03-15 17:48:35 +01:00
|
|
|
|
.col-xs-4
|
2016-12-07 13:57:55 +01:00
|
|
|
|
|
|
|
|
|
- if gestionnaire_signed_in?
|
2017-04-12 11:12:05 +02:00
|
|
|
|
#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" }
|
2016-12-07 13:57:55 +01:00
|
|
|
|
.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" } ×
|
2016-12-07 13:57:55 +01:00
|
|
|
|
%h4#myModalLabel.modal-title
|
|
|
|
|
Historique des
|
2017-04-12 11:12:05 +02:00
|
|
|
|
%span#pj-modal-title
|
2016-12-07 13:57:55 +01:00
|
|
|
|
.modal-body
|
|
|
|
|
%table.table
|
|
|
|
|
%thead
|
|
|
|
|
%th
|
2017-04-26 15:13:50 +02:00
|
|
|
|
Usager
|
2016-12-07 13:57:55 +01:00
|
|
|
|
%th
|
|
|
|
|
Date d'envoi
|
|
|
|
|
%th
|
|
|
|
|
Lien
|
2017-04-12 11:12:05 +02:00
|
|
|
|
%thead.tr-content#cerfa
|
2017-04-06 11:38:44 +02:00
|
|
|
|
- if @facade.procedure.cerfa_flag?
|
2016-12-07 13:57:55 +01:00
|
|
|
|
- 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
|
2016-12-07 13:57:55 +01:00
|
|
|
|
= cerfa.user.email
|
2016-12-23 16:58:06 +01:00
|
|
|
|
%td.col-md-6.col-sm-6.col-xs-6.col-lg-4
|
2016-12-07 13:57:55 +01:00
|
|
|
|
= 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 }
|
2016-12-07 13:57:55 +01:00
|
|
|
|
- @facade.dossier.types_de_piece_justificative.each do |type_de_piece_justificative|
|
2017-04-12 11:12:05 +02:00
|
|
|
|
%tbody.tr-content{ id: "type_de_pj_#{type_de_piece_justificative.id}" }
|
2016-12-07 13:57:55 +01:00
|
|
|
|
- @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
|
2016-12-07 13:57:55 +01:00
|
|
|
|
= 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
|
2016-12-07 13:57:55 +01:00
|
|
|
|
= 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 }
|
2016-12-07 13:57:55 +01:00
|
|
|
|
.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
|