#10976 datatables seatch agents
This commit is contained in:
parent
0336f03a6c
commit
49a795fdb9
|
@ -136,7 +136,13 @@ if ($searchAgents) {
|
|||
|
||||
$select = 'SELECT DISTINCT(t1.id_agente), t1.ultimo_contacto, t1.nombre, t1.comentarios, t1.id_os, t1.intervalo, t1.id_grupo, t1.disabled, t1.alias, t1.quiet';
|
||||
if (is_array($order)) {
|
||||
$limit = ' ORDER BY '.$order['field'].' '.$order['direction'];
|
||||
// Datatables offset, limit.
|
||||
$start = get_parameter('start', 0);
|
||||
$length = get_parameter(
|
||||
'length',
|
||||
$config['block_size']
|
||||
);
|
||||
$limit = ' ORDER BY '.$order['field'].' '.$order['direction'].' LIMIT '.$length.' OFFSET '.$start;
|
||||
}
|
||||
|
||||
$query = $select.$sql;
|
||||
|
|
|
@ -64,6 +64,11 @@ try {
|
|||
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
|
||||
]
|
||||
);
|
||||
|
||||
html_print_action_buttons(
|
||||
'',
|
||||
[ 'type' => 'data_table' ]
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
|
|
|
@ -76,14 +76,10 @@ if (enterprise_installed()) {
|
|||
|
||||
html_print_table($table);
|
||||
|
||||
if ($searchAgents && $totalAgents > 0) {
|
||||
if ($searchAgents) {
|
||||
echo $list_agents;
|
||||
|
||||
echo "<a href='index.php?search_category=agents&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(
|
||||
__('Show %s of %s. View all matches'),
|
||||
$count_agents_main,
|
||||
$totalAgents
|
||||
).'</a>';
|
||||
echo "<a href='index.php?search_category=agents&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".__('View all matches').'</a>';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ ui_print_standard_header(
|
|||
);
|
||||
|
||||
$only_count = false;
|
||||
hd($searchTab);
|
||||
|
||||
switch ($searchTab) {
|
||||
case 'main':
|
||||
$only_count = true;
|
||||
|
|
Loading…
Reference in New Issue