diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index e13211fb239..f3a15595fa6 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -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); diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 870d9ff5805..32859889b6c 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1382,8 +1382,18 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl print "\n"; $i++; } + + if ($num == 0) { + $colspan = 1 + ($showuserlogin ? 1 : 0); + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } + print ''.$langs->trans("NoRecordFound").''; + } } 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 .= ''; } - $out .= ''; + + $out .= ''; $out .= ''; $out .= ''; $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; }