diff --git a/app/views/new_gestionnaire/avis/show.html.haml b/app/views/new_gestionnaire/avis/show.html.haml index e88d364f3..4d422061e 100644 --- a/app/views/new_gestionnaire/avis/show.html.haml +++ b/app/views/new_gestionnaire/avis/show.html.haml @@ -2,8 +2,8 @@ = render partial: 'header', locals: { avis: @avis, dossier: @dossier } .container + .backoffice-title Identité du demandeur .card - .card-title Identité du demandeur - if @dossier.entreprise.present? = 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 } .backoffice-title Formulaire - - champs = @dossier.ordered_champs.decorate - if champs.any? - .card.featured + .card = render partial: 'new_gestionnaire/dossiers/champs', locals: { champs: champs } - 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? - .card.featured - .card-title Pièces jointes - - %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 + .backoffice-title Pièces jointes + .card + = render partial: "new_gestionnaire/dossiers/pieces_jointes", locals: { dossier: @dossier } diff --git a/app/views/new_gestionnaire/dossiers/_map.html.haml b/app/views/new_gestionnaire/dossiers/_map.html.haml index 47becb044..92c0093b1 100644 --- a/app/views/new_gestionnaire/dossiers/_map.html.haml +++ b/app/views/new_gestionnaire/dossiers/_map.html.haml @@ -1,19 +1,17 @@ -.card.featured - .card-title Cartographie - #map +#map - - if dossier.quartier_prioritaires.any? - .card-title Quartiers prioritaires - %ul - - dossier.quartier_prioritaires.each do |q| - %li= q.nom +- if dossier.quartier_prioritaires.any? + .card-title Quartiers prioritaires + %ul + - dossier.quartier_prioritaires.each do |q| + %li= q.nom - - if dossier.cadastres.any? - .card-title Parcelles cadastrales - %ul - - dossier.cadastres.each do |p| - %li - = "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}" +- if dossier.cadastres.any? + .card-title Parcelles cadastrales + %ul + - dossier.cadastres.each do |p| + %li + = "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}" :javascript var getPositionUrl = "#{position_dossier_path(dossier.procedure, dossier)}"; diff --git a/app/views/new_gestionnaire/dossiers/_pieces_jointes.html.haml b/app/views/new_gestionnaire/dossiers/_pieces_jointes.html.haml new file mode 100644 index 000000000..b25240793 --- /dev/null +++ b/app/views/new_gestionnaire/dossiers/_pieces_jointes.html.haml @@ -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 diff --git a/app/views/new_gestionnaire/dossiers/show.html.haml b/app/views/new_gestionnaire/dossiers/show.html.haml index 516d2c520..941566961 100644 --- a/app/views/new_gestionnaire/dossiers/show.html.haml +++ b/app/views/new_gestionnaire/dossiers/show.html.haml @@ -1,8 +1,8 @@ = render partial: "header", locals: { dossier: @dossier } .container + .backoffice-title Identité du demandeur .card - .card-title Identité du demandeur - if @dossier.entreprise.present? = render partial: "identite_entreprise", locals: { entreprise: @dossier.entreprise } @@ -10,38 +10,17 @@ = render partial: "identite_individual", locals: { individual: @dossier.individual } .backoffice-title Formulaire - - champs = @dossier.ordered_champs.decorate - if champs.any? - .card.featured + .card = render partial: "champs", locals: { champs: champs } - 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? - .card.featured - .card-title Pièces jointes - - %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 + .backoffice-title Pièces jointes + .card + = render partial: "pieces_jointes", locals: { dossier: @dossier }