%tr#p_customer{:id => p_customer.id} -tr = {} -tr[:enabled] = capture do %td -if p_customer.enabled Oui -tr[:test_user] = capture do %td -if p_customer.test_user Oui -tr[:parent] = capture do %td -if p_customer.parent =p_customer.parent.mlm_token ="-" =p_customer.show_name -tr[:mlm_token] = capture do %td -if p_customer.ambassadeur =p_customer.mlm_token -tr[:particular_tel] = capture do %td -if p_customer.particular =p_customer.particular.tel -tr[:p_commercial] = capture do %td = p_customer.p_commercial.long_name if p_customer.p_commercial -tr[:p_customer_cat] = capture do %td= p_customer.p_customer_cat.name if p_customer.p_customer_cat -tr[:particular_country] = capture do %td -if p_customer.particular = p_customer.particular.country -tr[:particular_address_2] = capture do %td -if p_customer.particular = p_customer.particular.address_2 -tr[:particular_address_3] = capture do %td -if p_customer.particular = p_customer.particular.address_3 -tr[:particular_cp] = capture do %td -if p_customer.particular = p_customer.particular.cp -tr[:particular_city] = capture do %td -if p_customer.particular = p_customer.particular.city -tr[:name] = capture do %td -if p_customer.particular = p_customer.particular.name -tr[:firstname] = capture do %td -if p_customer.particular = p_customer.particular.firstname -tr[:particular_fill] = capture do %td -if p_customer.particular_fill? Oui -elsif p_customer.particular_mail_sended == false -slug = "stickers-manque-adresse" =link_to ic(:envelope)+" #{slug}", send_mail_admin_p_customer_path(p_customer, :slug => slug), :remote => true, :class => "btn btn-primary" -else Non (mail déjà envoyé) -tr[:actions] = capture do %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 =p_customer.disabled_raison -else -if current_admin.has_permission?("customers-d") = 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? -if current_admin.has_permission?("customers-u") = link_to i(:pencil), edit_admin_p_customer_path(p_customer), :remote => false -if current_admin.has_permission?("customers-npai") = link_to "NPAI", npai_admin_p_customer_path(p_customer), :remote => false -if current_admin.has_permission?("customers-s") = link_to i(:eye), admin_p_customer_path(p_customer) =render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => p_customer}