-@read_only = true -@vouistar = true if @reseaux.id == 2 or @reseaux.parent_id == 2 .center.row .right =link_to i(:envelope)+" Ecrire à tout mon réseau", new_public_customer_message_path(:thing_type => "Reseaux", :thing_id => @reseaux.id), :class => "btn btn-primary" %h1 Mon réseau : =@reseaux.name %h3 Sous réseaux %table.table.admin_table.table-hover.table-striped %thead.rows_header %tr %th Nom %th Utilisateurs %th{:style => "width:100px"}   %tbody.rows =render @reseaux.children %h3 Membres du réseau %div{:style => "position:relative"} %table.table.table-hover.table-striped.customer_table %thead#customer_rows_header.rows_header %tr %th Société %th Nom %th Téléphone %th Ville %th Email -if !@vouistar %th CA %th Gains %th Dernière activité %th{:style => "width:100px;text-align:right;"}   %tbody#customer_rows.rows -gain = 0.0 -@reseaux.customers.each do |customer| -css_class = "" -css_class "danger" if customer.lock %tr#customer_row{:id => customer.id, :class => css_class} %td =customer.organisation %td =customer.name =customer.firstname %td -if customer.phone? = i("phone") + " #{customer.phone}" %td =customer.city %td =link_to customer.email, "mailto:#{customer.email}" -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=time_ago_in_words(customer.last_activity) if customer.last_activity %td.actions{:style => "width:150px;text-align:right;"} =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 @reseaux.id != 2 and @reseaux.parent_id != 2 %h3 Les besoins de mon réseau =render collection: @reseaux.needs, partial: 'public/needs/need_item', as: :need