|
@@ -91,7 +91,7 @@ if ($statut != '') {
|
|
|
$search_status = $statut; // For backward compatibility
|
|
|
}
|
|
|
|
|
|
-$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
|
|
+$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
|
|
|
|
|
if ($search_status < -2) {
|
|
|
$search_status = '';
|
|
@@ -234,7 +234,7 @@ if (empty($reshook)) {
|
|
|
$search_status = "";
|
|
|
$search_import_key = '';
|
|
|
$catid = "";
|
|
|
- $sall = "";
|
|
|
+ $search_all = "";
|
|
|
$toselect = array();
|
|
|
$search_array_options = array();
|
|
|
}
|
|
@@ -415,8 +415,8 @@ if (!empty($searchCategoryContactList)) {
|
|
|
}
|
|
|
|
|
|
$sql .= " AND d.entity IN (".getEntity('adherent').")";
|
|
|
-if ($sall) {
|
|
|
- $sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
|
|
+if ($search_all) {
|
|
|
+ $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
|
|
|
}
|
|
|
if ($search_type > 0) {
|
|
|
$sql .= " AND t.rowid=".((int) $search_type);
|
|
@@ -536,7 +536,7 @@ $num = $db->num_rows($resql);
|
|
|
|
|
|
|
|
|
// Direct jump if only one record found
|
|
|
-if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) {
|
|
|
+if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
|
|
|
$obj = $db->fetch_object($resql);
|
|
|
$id = $obj->rowid;
|
|
|
header("Location: ".DOL_URL_ROOT.'/adherents/card.php?id='.$id);
|
|
@@ -568,8 +568,11 @@ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
|
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
|
|
$param .= '&limit='.((int) $limit);
|
|
|
}
|
|
|
-if ($sall != "") {
|
|
|
- $param .= "&sall=".urlencode($sall);
|
|
|
+if ($optioncss != '') {
|
|
|
+ $param .= '&optioncss='.urlencode($optioncss);
|
|
|
+}
|
|
|
+if ($search_all != "") {
|
|
|
+ $param .= "&search_all=".urlencode($search_all);
|
|
|
}
|
|
|
if ($search_ref) {
|
|
|
$param .= "&search_ref=".urlencode($search_ref);
|
|
@@ -634,9 +637,6 @@ if ($search_import_key != '') {
|
|
|
if ($search_type > 0) {
|
|
|
$param .= "&search_type=".urlencode($search_type);
|
|
|
}
|
|
|
-if ($optioncss != '') {
|
|
|
- $param .= '&optioncss='.urlencode($optioncss);
|
|
|
-}
|
|
|
|
|
|
// Add $param from extra fields
|
|
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
|
@@ -663,14 +663,7 @@ if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'pr
|
|
|
}
|
|
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
|
|
|
|
|
-$newcardbutton = '';
|
|
|
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
|
|
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
|
|
-if ($user->hasRight('adherent', 'creer')) {
|
|
|
- $newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create');
|
|
|
-}
|
|
|
-
|
|
|
-print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
|
|
+print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
|
|
if ($optioncss != '') {
|
|
|
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
|
|
}
|
|
@@ -679,10 +672,20 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
|
|
print '<input type="hidden" name="action" value="list">';
|
|
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
|
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
|
|
+print '<input type="hidden" name="page" value="'.$page.'">';
|
|
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
|
|
+print '<input type="hidden" name="page_y" value="">';
|
|
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
|
|
|
|
|
|
|
|
+$newcardbutton = '';
|
|
|
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
|
|
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
|
|
+if ($user->hasRight('adherent', 'creer')) {
|
|
|
+ $newcardbutton .= dolGetButtonTitleSeparator();
|
|
|
+ $newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create');
|
|
|
+}
|
|
|
+
|
|
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
|
|
|
|
|
$topicmail = "Information";
|
|
@@ -691,15 +694,18 @@ $objecttmp = new Adherent($db);
|
|
|
$trackid = 'mem'.$object->id;
|
|
|
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
|
|
|
|
|
-if ($sall) {
|
|
|
+if ($search_all) {
|
|
|
+ $setupstring = '';
|
|
|
foreach ($fieldstosearchall as $key => $val) {
|
|
|
$fieldstosearchall[$key] = $langs->trans($val);
|
|
|
+ $setupstring .= $key."=".$val.";";
|
|
|
}
|
|
|
- print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>';
|
|
|
+ print '<!-- Search done like if MYOBJECT_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
|
|
|
+ print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'."\n";
|
|
|
}
|
|
|
|
|
|
-// Filter on categories
|
|
|
$moreforfilter = '';
|
|
|
+// Filter on categories
|
|
|
if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) {
|
|
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
|
|
$moreforfilter .= '<div class="divsearchfield">';
|
|
@@ -707,7 +713,7 @@ if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) {
|
|
|
$moreforfilter .= '</div>';
|
|
|
}
|
|
|
$parameters = array();
|
|
|
-$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
|
|
+$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
|
|
if (empty($reshook)) {
|
|
|
$moreforfilter .= $hookmanager->resPrint;
|
|
|
} else {
|
|
@@ -716,24 +722,26 @@ if (empty($reshook)) {
|
|
|
if (!empty($moreforfilter)) {
|
|
|
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
|
|
print $moreforfilter;
|
|
|
+ $parameters = array();
|
|
|
+ $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
|
|
+ print $hookmanager->resPrint;
|
|
|
print '</div>';
|
|
|
}
|
|
|
|
|
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
|
|
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
|
|
|
-if ($massactionbutton) {
|
|
|
- $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
|
|
-}
|
|
|
+$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
|
|
|
|
|
print '<div class="div-table-responsive">';
|
|
|
-print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
|
|
+print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
|
|
|
|
|
-// Line for filters fields
|
|
|
+// Fields title search
|
|
|
+// --------------------------------------------------------------------
|
|
|
print '<tr class="liste_titre_filter">';
|
|
|
|
|
|
// Action column
|
|
|
-if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
|
|
- print '<td class="liste_titre middle">';
|
|
|
+if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|
|
+ print '<td class="liste_titre center maxwidthsearch">';
|
|
|
$searchpicto = $form->showFilterButtons('left');
|
|
|
print $searchpicto;
|
|
|
print '</td>';
|
|
@@ -747,7 +755,7 @@ if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
|
|
|
// Ref
|
|
|
if (!empty($arrayfields['d.ref']['checked'])) {
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat maxwidth75imp" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
|
|
+ print '<input type="text" class="flat maxwidth75imp" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
|
|
@@ -919,113 +927,152 @@ if (!empty($arrayfields['d.import_key']['checked'])) {
|
|
|
print '</td>';
|
|
|
}
|
|
|
|
|
|
-if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
|
|
- // Action column
|
|
|
- print '<td class="liste_titre middle">';
|
|
|
+// Action column
|
|
|
+if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|
|
+ print '<td class="liste_titre center maxwidthsearch">';
|
|
|
$searchpicto = $form->showFilterButtons();
|
|
|
print $searchpicto;
|
|
|
print '</td>';
|
|
|
}
|
|
|
-print "</tr>\n";
|
|
|
+print '</tr>'."\n";
|
|
|
+
|
|
|
+$totalarray = array();
|
|
|
+$totalarray['nbfield'] = 0;
|
|
|
|
|
|
+// Fields title label
|
|
|
+// --------------------------------------------------------------------
|
|
|
print '<tr class="liste_titre">';
|
|
|
-if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
|
|
+// Action column
|
|
|
+if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch actioncolumn ');
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
|
|
|
print_liste_field_titre("ID", $_SERVER["PHP_SELF"], '', '', $param, 'align="center"', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.ref']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.ref']['label'], $_SERVER["PHP_SELF"], 'd.ref', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.civility']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.civility']['label'], $_SERVER["PHP_SELF"], 'd.civility', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.firstname']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.firstname']['label'], $_SERVER["PHP_SELF"], 'd.firstname', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.lastname']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.lastname']['label'], $_SERVER["PHP_SELF"], 'd.lastname', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.gender']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.gender']['label'], $_SERVER['PHP_SELF'], 'd.gender', $param, "", "", $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.company']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.company']['label'], $_SERVER["PHP_SELF"], 'companyname', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.login']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.login']['label'], $_SERVER["PHP_SELF"], 'd.login', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.morphy']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.morphy']['label'], $_SERVER["PHP_SELF"], 'd.morphy', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['t.libelle']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['t.libelle']['label'], $_SERVER["PHP_SELF"], 't.libelle', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.address']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.address']['label'], $_SERVER["PHP_SELF"], 'd.address', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.zip']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.zip']['label'], $_SERVER["PHP_SELF"], 'd.zip', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.town']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.town']['label'], $_SERVER["PHP_SELF"], 'd.town', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['state.nom']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['country.code_iso']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.phone']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.phone']['label'], $_SERVER["PHP_SELF"], 'd.phone', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.phone_perso']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.phone_perso']['label'], $_SERVER["PHP_SELF"], 'd.phone_perso', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.phone_mobile']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.phone_mobile']['label'], $_SERVER["PHP_SELF"], 'd.phone_mobile', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.email']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.email']['label'], $_SERVER["PHP_SELF"], 'd.email', '', $param, '', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.datefin']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.datefin']['label'], $_SERVER["PHP_SELF"], 'd.datefin,t.subscription', '', $param, '', $sortfield, $sortorder, 'center ');
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
// Extra fields
|
|
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
|
|
|
|
|
// Hook fields
|
|
|
-$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
|
|
+$parameters = array('arrayfields'=>$arrayfields, 'totalarray'=>&$totalarray, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
|
|
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
|
|
print $hookmanager->resPrint;
|
|
|
|
|
|
if (!empty($arrayfields['d.datec']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.datec']['label'], $_SERVER["PHP_SELF"], "d.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.birth']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.birth']['label'], $_SERVER["PHP_SELF"], "d.birth", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.tms']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.statut']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.statut']['label'], $_SERVER["PHP_SELF"], "d.statut,t.subscription,d.datefin", "", $param, 'class="right"', $sortfield, $sortorder);
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
if (!empty($arrayfields['d.import_key']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['d.import_key']['label'], $_SERVER["PHP_SELF"], "d.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
-if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
|
|
+if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
|
|
+ $totalarray['nbfield']++;
|
|
|
}
|
|
|
print "</tr>\n";
|
|
|
|
|
|
+// Loop on record
|
|
|
+// --------------------------------------------------------------------
|
|
|
$i = 0;
|
|
|
+$savnbfield = $totalarray['nbfield'];
|
|
|
$totalarray = array();
|
|
|
$totalarray['nbfield'] = 0;
|
|
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
|
|
while ($i < $imaxinloop) {
|
|
|
$obj = $db->fetch_object($resql);
|
|
|
+ if (empty($obj)) {
|
|
|
+ break; // Should not happen
|
|
|
+ }
|
|
|
|
|
|
$datefin = $db->jdate($obj->datefin);
|
|
|
|
|
@@ -1060,7 +1107,7 @@ while ($i < $imaxinloop) {
|
|
|
|
|
|
if ($mode == 'kanban') {
|
|
|
if ($i == 0) {
|
|
|
- print '<tr><td colspan="12">';
|
|
|
+ print '<tr><td colspan="'.$savnbfield.'">';
|
|
|
print '<div class="box-flex-container kanban">';
|
|
|
}
|
|
|
$membertypestatic->id = $obj->type_id;
|
|
@@ -1074,11 +1121,13 @@ while ($i < $imaxinloop) {
|
|
|
print '</td></tr>';
|
|
|
}
|
|
|
} else {
|
|
|
- print '<tr class="oddeven">';
|
|
|
+ // Show line of result
|
|
|
+ $j = 0;
|
|
|
+ print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
|
|
|
|
|
// Action column
|
|
|
- if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
|
|
- print '<td class="center">';
|
|
|
+ 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)) {
|
|
@@ -1087,6 +1136,9 @@ while ($i < $imaxinloop) {
|
|
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
|
|
}
|
|
|
print '</td>';
|
|
|
+ if (!$i) {
|
|
|
+ $totalarray['nbfield']++;
|
|
|
+ }
|
|
|
}
|
|
|
// Technical ID
|
|
|
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
|
|
@@ -1253,6 +1305,9 @@ while ($i < $imaxinloop) {
|
|
|
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->email).'">';
|
|
|
print dol_print_email($obj->email, 0, 0, 1, 64, 1, 1);
|
|
|
print "</td>\n";
|
|
|
+ if (!$i) {
|
|
|
+ $totalarray['nbfield']++;
|
|
|
+ }
|
|
|
}
|
|
|
// End of subscription date
|
|
|
$datefin = $db->jdate($obj->datefin);
|
|
@@ -1275,6 +1330,9 @@ while ($i < $imaxinloop) {
|
|
|
}
|
|
|
}
|
|
|
print '</td>';
|
|
|
+ if (!$i) {
|
|
|
+ $totalarray['nbfield']++;
|
|
|
+ }
|
|
|
}
|
|
|
// Extra fields
|
|
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
|
@@ -1327,7 +1385,7 @@ while ($i < $imaxinloop) {
|
|
|
}
|
|
|
}
|
|
|
// Action column
|
|
|
- if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
|
|
+ if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|
|
print '<td class="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;
|
|
@@ -1337,9 +1395,9 @@ while ($i < $imaxinloop) {
|
|
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
|
|
}
|
|
|
print '</td>';
|
|
|
- }
|
|
|
- if (!$i) {
|
|
|
- $totalarray['nbfield']++;
|
|
|
+ if (!$i) {
|
|
|
+ $totalarray['nbfield']++;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
print '</tr>'."\n";
|
|
@@ -1364,13 +1422,34 @@ if ($num == 0) {
|
|
|
|
|
|
$db->free($resql);
|
|
|
|
|
|
-$parameters = array('sql' => $sql);
|
|
|
-$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
|
|
|
+$parameters = array('arrayfields'=>$arrayfields, 'sql' => $sql);
|
|
|
+$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
|
|
print $hookmanager->resPrint;
|
|
|
|
|
|
-print "</table>\n";
|
|
|
-print "</div>";
|
|
|
-print '</form>';
|
|
|
+print '</table>'."\n";
|
|
|
+print '</div>'."\n";
|
|
|
+
|
|
|
+print '</form>'."\n";
|
|
|
+
|
|
|
+if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) {
|
|
|
+ $hidegeneratedfilelistifempty = 1;
|
|
|
+ if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) {
|
|
|
+ $hidegeneratedfilelistifempty = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
|
|
+ $formfile = new FormFile($db);
|
|
|
+
|
|
|
+ // Show list of available documents
|
|
|
+ $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
|
+ $urlsource .= str_replace('&', '&', $param);
|
|
|
+
|
|
|
+ $filedir = $diroutputmassaction;
|
|
|
+ $genallowed = $permissiontoread;
|
|
|
+ $delallowed = $permissiontoadd;
|
|
|
+
|
|
|
+ print $formfile->showdocuments('massfilesarea_'.$object->module, '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
|
|
|
+}
|
|
|
|
|
|
// End of page
|
|
|
llxFooter();
|