Merge pull request #851 from sgmap/demande-fixes

Demande fixes
This commit is contained in:
gregoirenovel 2017-10-17 11:32:12 +02:00 committed by GitHub
commit d895046177
4 changed files with 48 additions and 71 deletions

View file

@ -2,8 +2,8 @@
= render partial: 'header', locals: { avis: @avis, dossier: @dossier } = render partial: 'header', locals: { avis: @avis, dossier: @dossier }
.container .container
.backoffice-title Identité du demandeur
.card .card
.card-title Identité du demandeur
- if @dossier.entreprise.present? - if @dossier.entreprise.present?
= render partial: 'new_gestionnaire/dossiers/identite_entreprise', locals: { entreprise: @dossier.entreprise } = render partial: 'new_gestionnaire/dossiers/identite_entreprise', locals: { entreprise: @dossier.entreprise }
@ -11,37 +11,17 @@
= render partial: 'new_gestionnaire/dossiers/identite_individual', locals: { individual: @dossier.individual } = render partial: 'new_gestionnaire/dossiers/identite_individual', locals: { individual: @dossier.individual }
.backoffice-title Formulaire .backoffice-title Formulaire
- champs = @dossier.ordered_champs.decorate - champs = @dossier.ordered_champs.decorate
- if champs.any? - if champs.any?
.card.featured .card
= render partial: 'new_gestionnaire/dossiers/champs', locals: { champs: champs } = render partial: 'new_gestionnaire/dossiers/champs', locals: { champs: champs }
- if @dossier.procedure.use_api_carto - if @dossier.procedure.use_api_carto
= render partial: 'new_gestionnaire/dossiers/map', locals: { dossier: @dossier } .backoffice-title Cartographie
.card
= render partial: 'new_gestionnaire/dossiers/map', locals: { dossier: @dossier }
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any? - if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
.card.featured .backoffice-title Pièces jointes
.card-title Pièces jointes .card
= render partial: "new_gestionnaire/dossiers/pieces_jointes", locals: { dossier: @dossier }
%table.table.vertical
%tbody
- if @dossier.procedure.cerfa_flag?
%tr
%th Formulaire :
%td
- if @dossier.cerfa_available?
= link_to 'Télécharger', @dossier.cerfa.last.content_url, class: 'button', target: :blank
- else
Pièce non fournie
- @dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
%tr
%th= "#{type_de_piece_justificative.libelle} :"
%td
- pj = @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
- if pj.present?
Pièce fournie -
= link_to "Consulter", pj.content_url, class: "link", target: :blank
- else
Pièce non fournie

View file

@ -1,19 +1,17 @@
.card.featured #map
.card-title Cartographie
#map
- if dossier.quartier_prioritaires.any? - if dossier.quartier_prioritaires.any?
.card-title Quartiers prioritaires .card-title Quartiers prioritaires
%ul %ul
- dossier.quartier_prioritaires.each do |q| - dossier.quartier_prioritaires.each do |q|
%li= q.nom %li= q.nom
- if dossier.cadastres.any? - if dossier.cadastres.any?
.card-title Parcelles cadastrales .card-title Parcelles cadastrales
%ul %ul
- dossier.cadastres.each do |p| - dossier.cadastres.each do |p|
%li %li
= "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}" = "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}"
:javascript :javascript
var getPositionUrl = "#{position_dossier_path(dossier.procedure, dossier)}"; var getPositionUrl = "#{position_dossier_path(dossier.procedure, dossier)}";

View file

@ -0,0 +1,20 @@
%table.table.vertical
%tbody
- if dossier.procedure.cerfa_flag?
%tr
%th Formulaire :
%td
- if @dossier.cerfa_available?
= link_to "Télécharger", @dossier.cerfa.last.content_url, class: "link", target: :blank
- else
Pièce non fournie
- dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
%tr
%th= "#{type_de_piece_justificative.libelle} :"
%td
- pj = dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
- if pj.present?
= link_to "Télécharger", pj.content_url, class: "link", target: :blank
- else
Pièce non fournie

View file

@ -1,8 +1,8 @@
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier }
.container .container
.backoffice-title Identité du demandeur
.card .card
.card-title Identité du demandeur
- if @dossier.entreprise.present? - if @dossier.entreprise.present?
= render partial: "identite_entreprise", locals: { entreprise: @dossier.entreprise } = render partial: "identite_entreprise", locals: { entreprise: @dossier.entreprise }
@ -10,38 +10,17 @@
= render partial: "identite_individual", locals: { individual: @dossier.individual } = render partial: "identite_individual", locals: { individual: @dossier.individual }
.backoffice-title Formulaire .backoffice-title Formulaire
- champs = @dossier.ordered_champs.decorate - champs = @dossier.ordered_champs.decorate
- if champs.any? - if champs.any?
.card.featured .card
= render partial: "champs", locals: { champs: champs } = render partial: "champs", locals: { champs: champs }
- if @dossier.procedure.use_api_carto - if @dossier.procedure.use_api_carto
= render partial: "map", locals: { dossier: @dossier } .backoffice-title Cartographie
.card
= render partial: "map", locals: { dossier: @dossier }
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any? - if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
.card.featured .backoffice-title Pièces jointes
.card-title Pièces jointes .card
= render partial: "pieces_jointes", locals: { dossier: @dossier }
%table.table.vertical
%tbody
- if @dossier.procedure.cerfa_flag?
%tr
%th Formulaire :
%td
- if @dossier.cerfa_available?
Pièce fournie -
= link_to "Consulter", @dossier.cerfa.last.content_url, class: "link", target: :blank
- else
Pièce non fournie
- @dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
%tr
%th= "#{type_de_piece_justificative.libelle} :"
%td
- pj = @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
- if pj.present?
Pièce fournie -
= link_to "Consulter", pj.content_url, class: "link", target: :blank
- else
Pièce non fournie