diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index b57d5cc0505..dad9bbf2921 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -999,8 +999,12 @@ if ($moreforfilter) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, 'left'); // This also change content of $arrayfields -// Show the massaction checkboxes only when this page is not opend from the Extended POS +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +} else { + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, 'left'); // This also change content of $arrayfields +} + // Show the massaction checkboxes only when this page is not opend from the Extended POS if ($massactionbutton && $contextpage != 'poslist') { $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); } @@ -1014,11 +1018,13 @@ print '
| '; -$searchpicto = $form->showFilterButtons('left'); -print $searchpicto; -print ' | '; +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + // Action column + print ''; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ' | '; +} if (!empty($arrayfields['s.rowid']['checked'])) { print ''; print ''; @@ -1247,10 +1253,19 @@ if (!empty($arrayfields['s.import_key']['checked'])) { print ''; print ' | '; } +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + // Action column + print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ' | '; +} print "\n"; print '
| '; - if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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) && $contextpage != 'poslist') { // 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 ' | '; } - print ''; - if (!empty($arrayfields['s.rowid']['checked'])) { print ''; print $obj->rowid; @@ -1720,6 +1739,18 @@ while ($i < min($num, $limit)) { $totalarray['nbfield']++; } } + // Action column (Show the massaction button only when this page is not opend from the Extended POS) + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ' | '; + if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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 ' | '; + } if (!$i) { $totalarray['nbfield']++; }