highlighted the FOUND X RESULTS sentence
This commit is contained in:
@@ -763,43 +763,58 @@ function template_preprocess_materio_search_api_select_viewmode_block(&$vars){
|
||||
*
|
||||
* @see materio-search-api-results.tpl.php
|
||||
*/
|
||||
function template_preprocess_materio_search_api_results(array &$variables) {
|
||||
// dsm($variables, '$variables');
|
||||
$results = $variables['results'];
|
||||
$keys = $variables['keys'];
|
||||
function template_preprocess_materio_search_api_results(array &$vars) {
|
||||
// dsm($vars, '$vars');
|
||||
$results = $vars['results'];
|
||||
$keys = $vars['keys'];
|
||||
|
||||
// $variables['items'] = $variables['index']->loadItems(array_keys($variables['results']['results']));
|
||||
$variables['result_count'] = $results['result count'];
|
||||
$variables['sec'] = round($results['performance']['complete'], 3);
|
||||
// $vars['items'] = $vars['index']->loadItems(array_keys($vars['results']['results']));
|
||||
$vars['result_count'] = $results['result count'];
|
||||
$vars['sec'] = round($results['performance']['complete'], 3);
|
||||
|
||||
$vars['keywords'] = implode(', ', $vars['keys']);
|
||||
|
||||
if(isset($results['breves count'])){
|
||||
$variables['search_performance'] = format_plural(
|
||||
$vars['perfascard'] = true;
|
||||
$vars['search_performance'] = format_plural(
|
||||
$results['breves count'],
|
||||
'The search found 1 news ',
|
||||
'The search found @count news '
|
||||
);
|
||||
$variables['search_performance'] .= format_plural(
|
||||
$variables['result_count'] - $results['breves count'],
|
||||
$vars['search_performance'] .= format_plural(
|
||||
$vars['result_count'] - $results['breves count'],
|
||||
'with 1 associated matter.',
|
||||
'with @count associated matters.'
|
||||
);
|
||||
$variables['search_performance'] .= format_plural(
|
||||
$vars['search_performance'] .= format_plural(
|
||||
$results['could results']['result count'],
|
||||
' You could find 1 result with a ',
|
||||
' You could find <strong>@count results</strong> with a '
|
||||
);
|
||||
$variables['search_performance'] .= l(t('full access to materiO\'.'), 'node/11187');
|
||||
$vars['search_performance'] .= l(t('full access to materiO\'.'), 'node/11187');
|
||||
|
||||
$vars['search_performance'] .= l(t('pricing'), 'node/11187', array("attributes"=>array("class"=>array('button'))));
|
||||
|
||||
}else{
|
||||
$variables['search_performance'] = format_plural(
|
||||
// $results['result count'],
|
||||
$variables['result_count'],
|
||||
'The search found 1 result.',
|
||||
'The search found @count results.'
|
||||
$vars['perfascard'] = false;
|
||||
|
||||
// $vars['search_performance'] = format_plural(
|
||||
// // $results['result count'],
|
||||
// $vars['result_count'],
|
||||
// 'The search found 1 result ',
|
||||
// 'The search found @count results '
|
||||
// )
|
||||
|
||||
$vars['search_performance'] = t('The search found @count result(s) with keywords @keys. @mat materials and @new news.', array(
|
||||
"@count"=>$vars['result_count'],
|
||||
"@keys"=>$vars['keywords'],
|
||||
"@mat"=>4,
|
||||
"@new"=>7)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
//dsm($variables, 'variables');
|
||||
//dsm($vars, '$vars');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user