Debug v17
This commit is contained in:
parent
196184ca3f
commit
0d8d3e5205
@ -66,6 +66,7 @@ if (GETPOST('actioncode', 'array')) {
|
||||
} else {
|
||||
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
||||
}
|
||||
$search_rowid = GETPOST('search_rowid');
|
||||
$search_agenda_label = GETPOST('search_agenda_label');
|
||||
|
||||
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
|
||||
@ -105,6 +106,7 @@ if (empty($reshook)) {
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers
|
||||
$actioncode = '';
|
||||
$search_rowid = '';
|
||||
$search_agenda_label = '';
|
||||
}
|
||||
}
|
||||
@ -184,6 +186,7 @@ if ($object->id > 0) {
|
||||
// List of all actions
|
||||
$filters = array();
|
||||
$filters['search_agenda_label'] = $search_agenda_label;
|
||||
$filters['search_rowid'] = $search_rowid;
|
||||
|
||||
// TODO Replace this with same code than into list.php
|
||||
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder);
|
||||
|
||||
@ -1382,8 +1382,18 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num == 0) {
|
||||
$colspan = 1 + ($showuserlogin ? 1 : 0);
|
||||
foreach ($arrayfields as $key => $val) {
|
||||
if (!empty($val['checked'])) {
|
||||
$colspan++;
|
||||
}
|
||||
}
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
} else {
|
||||
$colspan = 1;
|
||||
$colspan = 1 + ($showuserlogin ? 1 : 0);
|
||||
foreach ($arrayfields as $key => $val) {
|
||||
if (!empty($val['checked'])) {
|
||||
$colspan++;
|
||||
@ -1805,7 +1815,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
||||
if ($donetodo) {
|
||||
$out .= '<td class="liste_titre"></td>';
|
||||
}
|
||||
$out .= '<td class="liste_titre"></td>';
|
||||
|
||||
$out .= '<td class="liste_titre"><input type="text" class="width50" name="search_rowid" value="'.(isset($filters['search_rowid']) ? $filters['search_rowid'] : '').'"></td>';
|
||||
$out .= '<td class="liste_titre"></td>';
|
||||
$out .= '<td class="liste_titre">';
|
||||
$out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, (empty($conf->global->AGENDA_USE_MULTISELECT_TYPE) ? 0 : 1), 1, 'minwidth100 maxwidth150');
|
||||
@ -2189,6 +2200,9 @@ function addOtherFilterSQL(&$sql, $donetodo, $now, $filters)
|
||||
if (is_array($filters) && $filters['search_agenda_label']) {
|
||||
$sql .= natural_search('a.label', $filters['search_agenda_label']);
|
||||
}
|
||||
if (is_array($filters) && $filters['search_rowid']) {
|
||||
$sql .= natural_search('a.id', $filters['search_rowid'], 1);
|
||||
}
|
||||
|
||||
return $sql;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user