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

72 lines
2.8 KiB
Text
Raw Normal View History

#infos_dossier
%div.row
.col-lg-6.col-md-6
%h3.text-info
= @facade.dossier.nom_projet
%h4
= @facade.dossier.procedure.libelle
2015-08-10 11:05:06 +02:00
.description
- begin
- @facade.dossier.description.split(/(?:\n\r?|\r\n?')/).each do |line|
2015-08-10 11:05:06 +02:00
= line
%br
- rescue
=''
- if @facade.dossier.mandataire_social && gestionnaire_signed_in?
.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
.col-lg-6.col-md-6
#map.mini{class: @facade.dossier.procedure.module_api_carto.classes}
%input{id: 'json_latlngs', type:'hidden', value: "#{@facade.dossier.json_latlngs}"}
%input{id: 'quartier_prioritaires', type:'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}"}
%input{id: 'cadastres', type:'hidden', value: "#{@facade.dossier.cadastres.to_json}"}
%script{type: 'text/javascript'}
= "var dossier_id =#{@facade.dossier.id}"
initCarto();
2015-08-10 11:05:06 +02:00
%br
-unless @facade.champs.nil?
.row
.col-lg-6.col-md-6
%table.table#liste_champs
-@facade.champs.each do |champ|
%tr
%th{ style: 'width:25%' }
=champ.libelle
%td
=champ.value
.col-lg-6.col-md-6
=render partial: '/dossiers/pieces_justificatives'
%br
.row{style: 'text-align:right'}
-if user_signed_in? && (current_user.email == @facade.dossier.user.email)
-if !@facade.dossier.validated? && !@facade.dossier.submitted? && !@facade.dossier.closed?
-if @facade.dossier.procedure.module_api_carto.use_api_carto
%a#maj_carte.btn.btn-primary{href: "/users/dossiers/#{@facade.dossier.id}/carte"}
= 'Editer ma carte'
%a#maj_infos.btn.btn-info{href: "/users/dossiers/#{@facade.dossier.id}/description"}
= 'Editer mon dossier'
-if gestionnaire_signed_in?
-if !@facade.dossier.validated? && !@facade.dossier.submitted? && !@facade.dossier.closed?
= 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
= 'Valider le dossier'
-elsif @facade.dossier.submitted?
= form_tag(url_for({controller: 'backoffice/dossiers', action: :close, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do
%button#action_button.btn.btn-success
= 'Traiter le dossier'