From 9df907c042699a6ee978ed17e7f7ae5832786352 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 27 May 2006 10:14:32 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20fl=E8ches=20d'ordonnancement=20des=20pr?= =?UTF-8?q?oduits=20sur=20les=20commandes=20et=20les=20propales?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/propal.php | 48 +++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 7578d315810..e27a7f69b84 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -483,6 +483,22 @@ if ($_POST["action"] == 'setmode') if ($resql < 0) dolibarr_print_error($db); } +/* + * Ordonnancement des lignes + */ + +if ($_GET['action'] == 'up' && $user->rights->propale->creer) +{ + $propal = new Propal($db); + $propal->line_up($_GET['rowid']); +} + +if ($_GET['action'] == 'down' && $user->rights->propale->creer) +{ + $propal = new Propal($db); + $propal->line_down($_GET['rowid']); +} + llxHeader(); @@ -867,7 +883,7 @@ if ($_GET['propalid'] > 0) if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.''; - print ' - '.nl2br(stripslashes($objp->product)); + print ' - '.nl2br(stripslashes($objp->product)); if ($conf->global->PROP_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC) { @@ -928,15 +944,27 @@ if ($_GET['propalid'] > 0) print 'rowid.'">'; print img_delete(); print ''; - print ''; - print ' '; // \todo Mettre critere ordre - print ''; - } - else - { - print ' '; - } - print ''; + print ''; + if ($i > 0) + { + print 'rowid.'">'; + print img_up(); + print ''; + } + if ($i < $num_lignes-1) + { + print 'rowid.'">'; + print img_down(); + print ''; + } + print ''; + } + else + { + print ' '; + } + + print ''; } // Ligne en mode update