Ajout flèches d'ordonnancement des produits sur les commandes et les propales

This commit is contained in:
Regis Houssin 2006-05-27 10:14:32 +00:00
parent c09803536d
commit 9df907c042

View File

@ -483,6 +483,22 @@ if ($_POST["action"] == 'setmode')
if ($resql < 0) dolibarr_print_error($db); 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(); llxHeader();
@ -929,13 +945,25 @@ if ($_GET['propalid'] > 0)
print img_delete(); print img_delete();
print '</a></td>'; print '</a></td>';
print '<td align="right">'; print '<td align="right">';
print '&nbsp;'; // \todo Mettre critere ordre if ($i > 0)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$propal->id.'&amp;action=up&amp;rowid='.$objp->rowid.'">';
print img_up();
print '</a>';
}
if ($i < $num_lignes-1)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$propal->id.'&amp;action=down&amp;rowid='.$objp->rowid.'">';
print img_down();
print '</a>';
}
print '</td>'; print '</td>';
} }
else else
{ {
print '<td colspan="3">&nbsp;</td>'; print '<td colspan="3">&nbsp;</td>';
} }
print '</tr>'; print '</tr>';
} }