From 10a9ab5ed179a3c02f21d8d9d17544bc04481a74 Mon Sep 17 00:00:00 2001 From: Faustin Date: Fri, 24 Jun 2022 13:56:24 +0200 Subject: [PATCH] NEW #20650 enabled checkcolumn on left for commande list --- htdocs/commande/list.php | 55 ++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 350674370e9..aa13e9607e6 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1374,7 +1374,7 @@ if ($resql) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); if (GETPOST('autoselectall', 'int')) { @@ -1391,6 +1391,14 @@ if ($resql) { print ''."\n"; print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } + // Ref if (!empty($arrayfields['c.ref']['checked'])) { print ''; } // Action column - print ''; - + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } print "\n"; // Fields title print ''; + + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); + } if (!empty($arrayfields['c.ref']['checked'])) { print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], 'c.ref', '', $param, '', $sortfield, $sortorder); } @@ -1794,7 +1807,9 @@ if ($resql) { if (!empty($arrayfields['c.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, '', $sortfield, $sortorder, 'center '); } - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); + } print ''."\n"; $total = 0; @@ -1875,6 +1890,18 @@ if ($resql) { print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; if (!$i) {
'; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; @@ -1643,15 +1651,20 @@ if ($resql) { print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print '
'; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } + print ''; + } + } + // Ref if (!empty($arrayfields['c.ref']['checked'])) { print ''; @@ -2435,13 +2462,15 @@ if ($resql) { } // Action column - print ''; - if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) { - $selected = 1; + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; } print '