function theme_activesearch_results in Javascript Tools 5
1 theme call to theme_activesearch_results()
- activesearch_results in activesearch/
activesearch.module
File
- activesearch/
activesearch.module, line 222
Code
function theme_activesearch_results($object_type, $keys, $items, $results) {
$tabs = array();
$tabs['activesearch'] = array(
'#type' => 'tabset',
);
$tabs['activesearch']['all'] = array(
'#type' => 'tabpage',
'#title' => t('All'),
'#content' => $results,
);
switch ($object_type) {
case 'node':
foreach ($items as $node_type) {
if ($result = activesearch_results_node($node_type, $keys)) {
$tabs['activesearch'][$node_type] = array(
'#type' => 'tabpage',
'#title' => node_get_types('name', $node_type) ? node_get_types('name', $node_type) : $node_type,
'#content' => $result,
);
}
}
break;
case 'term':
foreach ($items as $tid) {
if ($result = activesearch_results_term($tid, $keys)) {
$term = taxonomy_get_term($tid);
$tabs['activesearch'][$tid] = array(
'#type' => 'tabpage',
'#title' => $term->name,
'#content' => $result,
);
}
}
break;
}
return tabs_render($tabs);
}