Continue on dossier#show

This commit is contained in:
JC 2016-11-28 18:34:31 +01:00
parent fda8cac51c
commit 4a5c053ae5
9 changed files with 141 additions and 126 deletions

View file

@ -46,6 +46,7 @@ gem 'will_paginate-bootstrap'
# Decorators # Decorators
gem 'draper', '~> 3.0.0.pre1' gem 'draper', '~> 3.0.0.pre1'
gem 'unicode_utils'
#Gestion des comptes utilisateurs #Gestion des comptes utilisateurs
gem 'devise' gem 'devise'

View file

@ -588,6 +588,7 @@ GEM
unf_ext unf_ext
unf_ext (0.0.7.2) unf_ext (0.0.7.2)
unicode-display_width (1.1.1) unicode-display_width (1.1.1)
unicode_utils (1.4.0)
unicorn (5.2.0) unicorn (5.2.0)
kgio (~> 2.6) kgio (~> 2.6)
raindrops (~> 0.7) raindrops (~> 0.7)
@ -693,6 +694,7 @@ DEPENDENCIES
timecop timecop
turbolinks (~> 2.5) turbolinks (~> 2.5)
uglifier (>= 1.3.0) uglifier (>= 1.3.0)
unicode_utils
unicorn unicorn
vcr vcr
web-console (~> 2.0) web-console (~> 2.0)

View file

@ -11,6 +11,7 @@
margin-right: 2rem; margin-right: 2rem;
.default_data_block { .default_data_block {
background-color: #FFFFFF;
.show-block { .show-block {
width: 100%; width: 100%;
} }
@ -55,4 +56,4 @@
} }
} }
} }
} }

View file

@ -66,5 +66,27 @@
#infos { #infos {
} }
#dossier { #dossier {
.body {
padding: 0 20px 0 20px;
color: #000000;
.depositaire-label {
font-weight: bold;
text-align: end;
}
.depositaire-info {
}
.dossier-title {
font-size: 16px;
height: 40px;
text-align: center;
}
.split-hr {
border-bottom: 1px solid #979797;
height: 12px;
}
.title-row {
margin: 20px 10px 0 10px;
}
}
} }
} }

View file

@ -1,13 +1,3 @@
#infos_dossier{
background-color:rgba(248,248,255,0.8);
padding-left:13%;
padding-right:13%;
padding-bottom:20px;
padding-top:15px;
margin-left:-10rem;
margin-right:-10rem;
}
#UploadPJmodal { #UploadPJmodal {
text-align: left; text-align: left;
@ -16,4 +6,4 @@
margin-left: 0 !important; margin-left: 0 !important;
margin-bottom: 0; margin-bottom: 0;
} }
} }

View file

@ -64,10 +64,6 @@
%div.col-lg-2.col-md-2.action %div.col-lg-2.col-md-2.action
EDITER EDITER
%div.body %div.body
= render partial: '/dossiers/infos_dossier'
- if false
= render partial: '/dossiers/infos_dossier'
%div
= render partial: 'dossiers/tab_objects_dossier' = render partial: 'dossiers/tab_objects_dossier'

View file

@ -1,124 +1,117 @@
#infos_dossier %div.row
%div.row .col-lg-12.col-md-12
.col-lg-6.col-md-6 %h3= @facade.dossier.procedure.libelle
%h3 - if @facade.procedure.for_individual?
= @facade.dossier.procedure.libelle .row.title-row
%div.col-md-4.col-lg-4.split-hr
%div.col-md-4.col-lg-4.dossier-title= t('dynamics.dossiers.depositaite').upcase
%div.col-md-4.col-lg-4.split-hr
.row
%div.col-md-6.col-lg-6.depositaire-label Civilité
%div.col-md-6.col-lg-6.depositaire-info= @facade.individual.gender
.row
%div.col-md-6.col-lg-6.depositaire-label Nom
%div.col-md-6.col-lg-6.depositaire-info= @facade.individual.nom
.row
%div.col-md-6.col-lg-6.depositaire-label Prénom
%div.col-md-6.col-lg-6.despositaire-info= @facade.individual.prenom
- unless Features.opensimplif
.row
%div.col-md-6.col-lg-6.depositaire-label Date de naissance
%div.col-md-6.col-lg-6.depositaire-info= @facade.individual.birthdate
- if @facade.procedure.for_individual? - unless @facade.champs.nil?
.row.title-row
%div.col-md-4.col-lg-4.split-hr
%div.col-md-4.col-lg-4.dossier-title= t('dynamics.dossiers.liste_champs').upcase
%div.col-md-4.col-lg-4.split-hr
-@facade.champs.each do |champ|
.row
%div.col-md-6.col-lg-6.depositaire-label= champ.libelle
%div.col-md-1.col-lg-1.depositaire-info
-if gestionnaire_signed_in?
= link_to "COM", "", "data-href" => backoffice_dossier_commentaires_path(@facade.dossier, champs_id: champ.id),
"data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp"
-else
= link_to "COM", "", "data-href" => users_dossier_commentaires_path(@facade.dossier, champs_id: champ.id),
"data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp"
%div.col-md-5.col-lg-5.depositaire-info
-unless champ.decorate.value.blank?
= champ.decorate.value.html_safe
.row
.col-lg-12.col-md-12
=render partial: '/dossiers/pieces_justificatives'
- if @facade.dossier.mandataire_social && gestionnaire_signed_in?
.mandataire_social.text-success.center
%br %br
.individual.text-info ="Il est probable que le soumissionnaire du dossier soit un des mandataire social de l'entreprise ("
%h4 %b
=t('dynamics.dossiers.depositaite') ="#{@facade.dossier.user.given_name} #{@facade.dossier.user.family_name}"
=")"
%table.table{style:'width: 60%'} - if @facade.dossier.procedure.module_api_carto.use_api_carto
%tr .col-lg-6.col-md-6
%th.col-md-3.col-lg-3
Civilité
%td.col-md-5.col-lg-5
= @facade.individual.gender
%tr
%th.col-md-3.col-lg-3
Nom
%td.col-md-5.col-lg-5
= @facade.individual.nom
%tr
%th.col-md-3.col-lg-3
Prénom
%td.col-md-5.col-lg-5
= @facade.individual.prenom
- unless Features.opensimplif
%tr
%th.col-md-3.col-lg-3
Date de naissance
%td.col-md-5.col-lg-5
= @facade.individual.birthdate
- if @facade.dossier.mandataire_social && gestionnaire_signed_in? #map.mini{class: @facade.dossier.procedure.module_api_carto.classes}
.mandataire_social.text-success.center
%br
="Il est probable que le soumissionnaire du dossier soit un des mandataire social de l'entreprise ("
%b
="#{@facade.dossier.user.given_name} #{@facade.dossier.user.family_name}"
=")"
- if @facade.dossier.procedure.module_api_carto.use_api_carto %input{id: 'json_latlngs', type:'hidden', value: "#{@facade.dossier.json_latlngs}"}
.col-lg-6.col-md-6 %input{id: 'quartier_prioritaires', type:'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}"}
%input{id: 'cadastres', type:'hidden', value: "#{@facade.dossier.cadastres.to_json}"}
#map.mini{class: @facade.dossier.procedure.module_api_carto.classes} %script{type: 'text/javascript'}
= "var dossier_id =#{@facade.dossier.id}"
initCarto();
%input{id: 'json_latlngs', type:'hidden', value: "#{@facade.dossier.json_latlngs}"} %br
%input{id: 'quartier_prioritaires', type:'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}"} %br
%input{id: 'cadastres', type:'hidden', value: "#{@facade.dossier.cadastres.to_json}"}
%script{type: 'text/javascript'} .row{style: 'text-align:right'}
= "var dossier_id =#{@facade.dossier.id}" - unless @facade.dossier.read_only?
initCarto(); - if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.size > 0
%br %a#maj_pj.btn.btn-success{"data-target" => "#UploadPJmodal",
-unless @facade.champs.nil? "data-toggle" => "modal",
.row :type => "button",
.col-lg-6.col-md-6 style: 'margin-bottom: 15px; margin-top: -30px'}
%table.table#liste_champs Modifier les documents
-@facade.champs.each do |champ| %br
%tr = render partial: 'users/recapitulatif/modal_upload_pj'
%th{ style: 'width:25%' }
=champ.libelle
-if gestionnaire_signed_in?
=link_to "COM", "", "data-href" => backoffice_dossier_commentaires_path(@facade.dossier, champs_id: champ.id),
"data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp"
-else
=link_to "COM", "", "data-href" => users_dossier_commentaires_path(@facade.dossier, champs_id: champ.id),
"data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp"
%td
-unless champ.decorate.value.blank?
=champ.decorate.value.html_safe
.col-lg-6.col-md-6
=render partial: '/dossiers/pieces_justificatives'
%br
.row{style: 'text-align:right'}
- unless @facade.dossier.read_only?
- if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.size > 0
%a#maj_pj.btn.btn-success{"data-target" => "#UploadPJmodal",
"data-toggle" => "modal",
:type => "button",
style: 'margin-bottom: 15px; margin-top: -30px'}
Modifier les documents
%br
= render partial: 'users/recapitulatif/modal_upload_pj'
-if @facade.procedure.individual_with_siret -if @facade.procedure.individual_with_siret
%a#add_siret.btn.btn-success{href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id)} %a#add_siret.btn.btn-success{href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id)}
= "Renseigner un SIRET" = "Renseigner un SIRET"
-if @facade.dossier.procedure.module_api_carto.use_api_carto -if @facade.dossier.procedure.module_api_carto.use_api_carto
%a#maj_carte.btn.btn-primary{href: "/users/dossiers/#{@facade.dossier.id}/carte"} %a#maj_carte.btn.btn-primary{href: "/users/dossiers/#{@facade.dossier.id}/carte"}
= 'Modifier la carte' = 'Modifier la carte'
%a#maj_infos.btn.btn-info{href: "/users/dossiers/#{@facade.dossier.id}/description"} %a#maj_infos.btn.btn-info{href: "/users/dossiers/#{@facade.dossier.id}/description"}
= 'Modifier le dossier' = 'Modifier le dossier'
-if gestionnaire_signed_in? -if gestionnaire_signed_in?
-if !@facade.dossier.read_only? -if !@facade.dossier.read_only?
= form_tag(url_for({controller: 'backoffice/dossiers', action: :valid, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do = form_tag(url_for({controller: 'backoffice/dossiers', action: :valid, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do
%button.action_button.btn.btn-success{'data-toggle' => :tooltip, title: 'En cliquant ici, vous figez le dossier et autorisez le dépôt du dossier pour instruction.'} %button.action_button.btn.btn-success{'data-toggle' => :tooltip, title: 'En cliquant ici, vous figez le dossier et autorisez le dépôt du dossier pour instruction.'}
= 'Déclarer complet' = 'Déclarer complet'
-elsif @facade.dossier.submitted? -elsif @facade.dossier.submitted?
= form_tag(url_for({controller: 'backoffice/dossiers', action: :receive, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do = form_tag(url_for({controller: 'backoffice/dossiers', action: :receive, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do
%button.action_button.btn.btn-success %button.action_button.btn.btn-success
= 'Accuser réception' = 'Accuser réception'
-elsif @facade.dossier.received? -elsif @facade.dossier.received?
= form_tag(url_for({controller: 'backoffice/dossiers', action: :close, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Accepter') do = form_tag(url_for({controller: 'backoffice/dossiers', action: :close, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Accepter') do
%button.action_button.btn.btn-success %button.action_button.btn.btn-success
%i.fa.fa-check %i.fa.fa-check
= form_tag(url_for({controller: 'backoffice/dossiers', action: :refuse, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Refuser') do = form_tag(url_for({controller: 'backoffice/dossiers', action: :refuse, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Refuser') do
%button.action_button.btn.btn-danger %button.action_button.btn.btn-danger
%i.fa.fa-times %i.fa.fa-times
= form_tag(url_for({controller: 'backoffice/dossiers', action: :without_continuation, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Classer sans suite') do = form_tag(url_for({controller: 'backoffice/dossiers', action: :without_continuation, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Classer sans suite') do
%button.action_button.btn.btn-warning %button.action_button.btn.btn-warning
%i.fa.fa-circle-o %i.fa.fa-circle-o
#modalCommentairesDossierParChamp.modal.fade{"tabindex" => -1, "role" => "dialog"} #modalCommentairesDossierParChamp.modal.fade{"tabindex" => -1, "role" => "dialog"}
.modal-dialog{"role" => "document"} .modal-dialog{"role" => "document"}

View file

@ -0,0 +1,9 @@
require "unicode_utils/upcase"
class String
def upcase
UnicodeUtils.upcase(self)
end
end

View file

@ -33,6 +33,7 @@ fr:
invites: invites:
title: "Personnes invitées à voir ce dossier" title: "Personnes invitées à voir ce dossier"
empty: "Aucune personne invitée" empty: "Aucune personne invitée"
liste_champs: "Champs du dossier"
admin: admin:
connexion_title: Administration connexion_title: Administration