%tr#p_customer{:id => p_customer.id} %td -if p_customer.enabled Actif -else %span.red =ic :lock Client bloqué : =p_customer.disabled_raison %td= p_customer.code %td = p_customer.p_commercial.long_name if p_customer.p_commercial %td= p_customer.show_name %td -if p_customer.particular = p_customer.particular.cp = p_customer.particular.city = p_customer.particular.country -if false %td -if p_customer.particular -t = [] - p_customer.particular.p_contacts.each do |pc| -if pc.tel? -t << pc.tel =t.join(" || ") -if false %td{:style => "text-align:right;"} =number_to_currency p_customer.cache_ca HT %td{:style => "text-align:right;"}=number_to_currency p_customer.cache_encours_th %td.actions -if params[:offre].to_s == "true" -if p_customer.enabled =link_to ic(:"arrow-right")+" Demande de commande", new_admin_p_customer_sheet_path(:p_customer_id => p_customer.id), :class => "btn btn-primary btn-ap-add" -else .badge.badge-danger =ic :lock Client bloqué : =p_customer.disabled_raison -else = link_to i(:"trash-o"), [:admin, p_customer], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer ce client ? ' } , :remote => true if p_customer.can_destroy? = link_to i(:pencil), edit_admin_p_customer_path(p_customer), :remote => false = link_to i(:eye), admin_p_customer_path(p_customer)