checkbox colum on left for resource list
This commit is contained in:
parent
e36a1ebf7c
commit
f53b55b360
@ -186,7 +186,7 @@ if ($action == 'delete_resource') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);
|
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));
|
||||||
|
|
||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
@ -230,6 +230,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 maxwidthsearch">';
|
||||||
|
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
||||||
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
if (!empty($arrayfields['t.ref']['checked'])) {
|
if (!empty($arrayfields['t.ref']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="6">';
|
print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="6">';
|
||||||
@ -243,13 +250,19 @@ if (!empty($arrayfields['ty.label']['checked'])) {
|
|||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
print $searchpicto;
|
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
||||||
print '</td>';
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
// Action column
|
||||||
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
}
|
||||||
if (!empty($arrayfields['t.ref']['checked'])) {
|
if (!empty($arrayfields['t.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], "t.ref", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], "t.ref", "", $param, "", $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
@ -258,7 +271,10 @@ if (!empty($arrayfields['ty.label']['checked'])) {
|
|||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
// Action column
|
||||||
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
@ -266,6 +282,19 @@ if ($ret) {
|
|||||||
foreach ($object->lines as $resource) {
|
foreach ($object->lines as $resource) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
|
// Action column
|
||||||
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print '<td class="center">';
|
||||||
|
print '<a class="editfielda" href="./card.php?action=edit&token='.newToken().'&id='.$resource->id.'">';
|
||||||
|
print img_edit();
|
||||||
|
print '</a>';
|
||||||
|
print ' ';
|
||||||
|
print '<a href="./card.php?action=delete&token='.newToken().'&id='.$resource->id.'">';
|
||||||
|
print img_delete('', 'class="marginleftonly"');
|
||||||
|
print '</a>';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($arrayfields['t.ref']['checked'])) {
|
if (!empty($arrayfields['t.ref']['checked'])) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $resource->getNomUrl(5);
|
print $resource->getNomUrl(5);
|
||||||
@ -287,15 +316,18 @@ if ($ret) {
|
|||||||
$obj = (Object) $resource->array_options;
|
$obj = (Object) $resource->array_options;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
|
|
||||||
print '<td class="center">';
|
// Action column
|
||||||
print '<a class="editfielda" href="./card.php?action=edit&token='.newToken().'&id='.$resource->id.'">';
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print img_edit();
|
print '<td class="center">';
|
||||||
print '</a>';
|
print '<a class="editfielda" href="./card.php?action=edit&token='.newToken().'&id='.$resource->id.'">';
|
||||||
print ' ';
|
print img_edit();
|
||||||
print '<a href="./card.php?action=delete&token='.newToken().'&id='.$resource->id.'">';
|
print '</a>';
|
||||||
print img_delete('', 'class="marginleftonly"');
|
print ' ';
|
||||||
print '</a>';
|
print '<a href="./card.php?action=delete&token='.newToken().'&id='.$resource->id.'">';
|
||||||
print '</td>';
|
print img_delete('', 'class="marginleftonly"');
|
||||||
|
print '</a>';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user