demarches-normaliennes/app/views/dossiers/_infos_dossier.html.haml
2015-09-24 11:37:18 +02:00

42 lines
No EOL
1.6 KiB
Text

= javascript_include_tag "https://code.highcharts.com/highcharts.js", "chartkick"
#infos_dossier
%div.row
.col-lg-6.col-md-6
%h3.text-info
= @dossier.nom_projet
%br
%div.row
.col-lg-6.col-md-6
%h4 Montant total
%p{style:'margin-left:5%'}
=number_to_currency(@dossier.montant_projet.to_f, :unit => " ", :separator => ",", :delimiter => " ")
!='€'
.col-lg-6.col-md-6
%h4 Début du projet souhaité
%p{style:'margin-left:5%'}
= @dossier.date_fr
%div.row
.col-lg-6.col-md-6
%h4 Montant souhaité
%p{style:'margin-left:5%'}
=number_to_currency(@dossier.montant_aide_demande.to_f, :unit => " ", :separator => ",", :delimiter => " ")
!='€'
%br
.description
- begin
- @dossier.description.split(/(?:\n\r?|\r\n?')/).each do |line|
= line
%br
- rescue
=''
.col-lg-6.col-md-6
=render partial: '/dossiers/pieces_justificatives'
-#= pie_chart({"Montant à charge #{(100 - @dossier.montant_aide_demande.to_f/@dossier.montant_projet.to_f*100).round(2)}%" => (@dossier.montant_projet.to_f - @dossier.montant_aide_demande.to_f), "Montant souhaité #{(@dossier.montant_aide_demande.to_f/@dossier.montant_projet.to_f*100).round(2)}%" => @dossier.montant_aide_demande})
%div.row{style: 'text-align:right'}
%a#maj_infos.btn.btn-info{href: "/users/dossiers/#{@dossier.id}/description?back_url=recapitulatif"}
= 'Editer mon dossier'