From 99ae57c3628c6953bc85f87eee530f6883749322 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 7 Jun 2017 19:16:11 +0200 Subject: [PATCH] vouistar --- app/views/public/reseauxes/show.html.haml | 32 ++++++++++++----------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/app/views/public/reseauxes/show.html.haml b/app/views/public/reseauxes/show.html.haml index b8e181f..77f6070 100644 --- a/app/views/public/reseauxes/show.html.haml +++ b/app/views/public/reseauxes/show.html.haml @@ -1,5 +1,5 @@ -@read_only = true - +-@vouistar = true if @reseaux.id != 2 and @reseaux.parent_id != 2 .center.row .right @@ -46,10 +46,11 @@ %th Email - %th - CA - %th - Gains + -if !@vouistar + %th + CA + %th + Gains %th Dernière activité @@ -83,13 +84,14 @@ %td =link_to customer.email, "mailto:#{customer.email}" - %td - =number_to_currency customer.accepted_offers.joins(:offer).where(:state => "documents_completed").sum("offers.price * accepted_offers.qte").to_f + -if !@vouistar + %td + =number_to_currency customer.accepted_offers.joins(:offer).where(:state => "documents_completed").sum("offers.price * accepted_offers.qte").to_f - %td - -g = customer.accepted_offers.joins(:offer).where(:state => "documents_completed").sum("offers.gain * accepted_offers.qte").to_f - =number_to_currency g - -gain += g + %td + -g = customer.accepted_offers.joins(:offer).where(:state => "documents_completed").sum("offers.gain * accepted_offers.qte").to_f + =number_to_currency g + -gain += g %td=time_ago_in_words(customer.last_activity) if customer.last_activity @@ -99,10 +101,10 @@ =link_to i(:eye), public_customer_path(customer) =link_to i(:envelope), new_public_customer_message_path(:thing_type => "Customer", :thing_id => customer.id) - - %div{:style => "position:absolute;top:-30px;right:10px;"} - Gains : - =number_to_currency gain + -if !@vouistar + %div{:style => "position:absolute;top:-30px;right:10px;"} + Gains : + =number_to_currency gain -if @reseaux.id != 2 and @reseaux.parent_id != 2 %h3 Les besoins de mon réseau