checkbox colum on left for leave list
This commit is contained in:
parent
9c64a21bd9
commit
d78a707972
@ -540,7 +540,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$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
|
||||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||||
|
|
||||||
|
|
||||||
@ -555,7 +555,13 @@ if ($resql) {
|
|||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
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 maxwidthsearch">';
|
||||||
|
$searchpicto = $form->showFilterButtons('left');
|
||||||
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
if (!empty($arrayfields['cp.ref']['checked'])) {
|
if (!empty($arrayfields['cp.ref']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||||
@ -681,14 +687,19 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterButtons();
|
$searchpicto = $form->showFilterButtons();
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
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, 'maxwidthsearch center ');
|
||||||
|
}
|
||||||
if (!empty($arrayfields['cp.ref']['checked'])) {
|
if (!empty($arrayfields['cp.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['cp.ref']['label'], $_SERVER["PHP_SELF"], "cp.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['cp.ref']['label'], $_SERVER["PHP_SELF"], "cp.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
@ -731,7 +742,9 @@ if ($resql) {
|
|||||||
if (!empty($arrayfields['cp.statut']['checked'])) {
|
if (!empty($arrayfields['cp.statut']['checked'])) {
|
||||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cp.statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cp.statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
}
|
}
|
||||||
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon"));
|
$listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon"));
|
||||||
@ -789,7 +802,18 @@ if ($resql) {
|
|||||||
$endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
|
$endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
|
||||||
|
|
||||||
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>';
|
||||||
|
}
|
||||||
if (!empty($arrayfields['cp.ref']['checked'])) {
|
if (!empty($arrayfields['cp.ref']['checked'])) {
|
||||||
print '<td class="nowraponall">';
|
print '<td class="nowraponall">';
|
||||||
print $holidaystatic->getNomUrl(1, 1);
|
print $holidaystatic->getNomUrl(1, 1);
|
||||||
@ -893,6 +917,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="nowrap center">';
|
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
|
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;
|
$selected = 0;
|
||||||
@ -902,6 +927,7 @@ if ($resql) {
|
|||||||
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