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

39 lines
1.2 KiB
Text
Raw Normal View History

2015-09-01 17:02:54 +02:00
= javascript_include_tag "https://code.highcharts.com/highcharts.js", "chartkick"
2015-08-20 16:04:36 +02:00
.row#infos_dossier
2015-08-10 11:05:06 +02:00
.col-md-6
2015-08-20 16:04:36 +02:00
%h4.text-info
= @dossier.nom_projet
%div
2015-08-10 11:05:06 +02:00
.description
- begin
- @dossier.description.split(/(?:\n\r?|\r\n?')/).each do |line|
= line
%br
- rescue
=''
%br
.col-lg-6.col-md-6
2015-08-20 16:04:36 +02:00
%h4 Montant total
2015-08-10 11:05:06 +02:00
2015-08-20 16:04:36 +02:00
%p
2015-08-10 11:05:06 +02:00
=number_to_currency(@dossier.montant_projet.to_f, :unit => " ", :separator => ",", :delimiter => " ")
!='€'
.col-lg-6.col-md-6
2015-08-20 16:04:36 +02:00
%h4 Début du projet souhaité
%p
= @dossier.date_fr
2015-08-10 11:05:06 +02:00
2015-09-22 15:00:59 +02:00
/ -if !request.url.include?('admin')
- unless gestionnaire_signed_in?
.col-lg-6.col-md-6
%br
%br
%a#modif_description{href: "/dossiers/#{@dossier.id}/description?back_url=recapitulatif"} Modifier la description
2015-08-10 11:05:06 +02:00
.col-md-6
= 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})