From 830ec9c9cb2f9d5684ac5f0cc7d6ec06e6ef3d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 18 Oct 2014 16:36:28 +0200 Subject: [PATCH] Update list.php --- htdocs/product/list.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index ebcd3245e7d..7e817d69725 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -507,11 +507,25 @@ else } } - // Status (to buy) - print ''.$product_static->LibStatut($objp->tosell,5,0).''; - + $product_static->status_buy = $objp->tobuy; + $product_static->status = $objp->tosell; // Status (to sell) - print ''.$product_static->LibStatut($objp->tobuy,5,1).''; + print ''; + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + print ajax_object_onoff($product_static, 'status'); + } else { + print $product_static->LibStatut($objp->tosell,5,0); + } + print ''; + + // Status (to buy) + print ''; + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + print ajax_object_onoff($product_static, 'status_buy'); + } else { + print $product_static->LibStatut($objp->tobuy,5,1); + } + print ''; print ' ';