From 8af82f4cb553df50d2fb92f9ed11923fc3ab7f96 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 1 Apr 2006 02:20:23 +0000 Subject: [PATCH] =?UTF-8?q?Look:=20Modifications=20esth=E9tiques=20mineure?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product.class.php | 19 ++++++++++++------- htdocs/product/liste.php | 5 +++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/htdocs/product.class.php b/htdocs/product.class.php index f8a04335fd9..21dfaf7deb7 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -1562,9 +1562,9 @@ function get_each_prod() } /** - * \brief Retourne le libellé du statut d'une facture (brouillon, validée, abandonnée, payée) - * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court - * \return string Libelle + * \brief Retourne le libellé du statut d'une facture (brouillon, validée, abandonnée, payée) + * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto + * \return string Libelle */ function getLibStatut($mode=0) { @@ -1572,10 +1572,10 @@ function get_each_prod() } /** - * \brief Renvoi le libellé d'un statut donne - * \param status Statut - * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court - * \return string Libellé du statut + * \brief Renvoi le libellé d'un statut donne + * \param status Statut + * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto + * \return string Libellé du statut */ function LibStatut($status,$mode=0) { @@ -1596,6 +1596,11 @@ function get_each_prod() if ($status == 0) return img_picto($langs->trans('ProductStatusNotOnSell'),'statut5').' '.$langs->trans('ProductStatusNotOnSell'); if ($status == 1) return img_picto($langs->trans('ProductStatusOnSell'),'statut4').' '.$langs->trans('ProductStatusOnSell'); } + if ($mode == 5) + { + if ($status == 0) return $langs->trans('ProductStatusNotOnSell').' '.img_picto($langs->trans('ProductStatusNotOnSell'),'statut5'); + if ($status == 1) return $langs->trans('ProductStatusOnSell').' '.img_picto($langs->trans('ProductStatusOnSell'),'statut4'); + } return $langs->trans('Unknown'); } diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 514c578d712..03d5559936d 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -146,6 +146,7 @@ if ($resql) { $objp = $db->fetch_object($resql); Header("Location: fiche.php?id=$objp->rowid"); + exit; } if (isset($_GET["envente"]) || isset($_POST["envente"])) @@ -252,7 +253,7 @@ if ($resql) } $var=!$var; - print ""; + print ''; print "rowid\">"; if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); @@ -265,7 +266,7 @@ if ($resql) print ''.$objp->duration.''; } print ''.price($objp->price).''; - print ''.$product_static->LibStatut($objp->statut,2).''; + print ''.$product_static->LibStatut($objp->statut,5).''; print "\n"; $i++; }