checkbox colum on left for contract lists
This commit is contained in:
parent
85652a278d
commit
574b9159ca
@ -618,7 +618,7 @@ if (!empty($moreforfilter)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$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
|
||||||
if ($massactionbutton) {
|
if ($massactionbutton) {
|
||||||
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||||
}
|
}
|
||||||
@ -627,6 +627,13 @@ print '<div class="div-table-responsive">';
|
|||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
|
// Action column
|
||||||
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print '<td class="liste_titre center">';
|
||||||
|
$searchpicto = $form->showFilterButtons('left');
|
||||||
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
if (!empty($arrayfields['c.ref']['checked'])) {
|
if (!empty($arrayfields['c.ref']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" size="3" name="search_contract" value="'.dol_escape_htmltag($search_contract).'">';
|
print '<input type="text" class="flat" size="3" name="search_contract" value="'.dol_escape_htmltag($search_contract).'">';
|
||||||
@ -723,13 +730,20 @@ if (!empty($arrayfields['lower_planned_end_date']['checked'])) {
|
|||||||
if (!empty($arrayfields['status']['checked'])) {
|
if (!empty($arrayfields['status']['checked'])) {
|
||||||
print '<td class="liste_titre right" colspan="4"></td>';
|
print '<td class="liste_titre right" colspan="4"></td>';
|
||||||
}
|
}
|
||||||
print '<td class="liste_titre center">';
|
|
||||||
$searchpicto = $form->showFilterButtons();
|
// Action column
|
||||||
print $searchpicto;
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '</td>';
|
print '<td class="liste_titre center">';
|
||||||
|
$searchpicto = $form->showFilterButtons();
|
||||||
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
if(getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
}
|
||||||
if (!empty($arrayfields['c.ref']['checked'])) {
|
if (!empty($arrayfields['c.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
@ -787,7 +801,9 @@ if (!empty($arrayfields['status']['checked'])) {
|
|||||||
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
|
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
|
||||||
print_liste_field_titre($staticcontratligne->LibStatut(5, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
|
print_liste_field_titre($staticcontratligne->LibStatut(5, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
|
||||||
}
|
}
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
if(!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
@ -826,7 +842,18 @@ while ($i < min($num, $limit)) {
|
|||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
// Action column
|
||||||
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print '<td class="nowrap center">';
|
||||||
|
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 '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
// Ref
|
// Ref
|
||||||
if (!empty($arrayfields['c.ref']['checked'])) {
|
if (!empty($arrayfields['c.ref']['checked'])) {
|
||||||
print '<td class="nowraponall">';
|
print '<td class="nowraponall">';
|
||||||
@ -1002,15 +1029,17 @@ while ($i < min($num, $limit)) {
|
|||||||
print '<td class="center">'.($obj->nb_closed > 0 ? $obj->nb_closed : '').'</td>';
|
print '<td class="center">'.($obj->nb_closed > 0 ? $obj->nb_closed : '').'</td>';
|
||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowrap center">';
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
print '<td class="nowrap center">';
|
||||||
$selected = 0;
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
if (in_array($obj->rowid, $arrayofselected)) {
|
$selected = 0;
|
||||||
$selected = 1;
|
if (in_array($obj->rowid, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user