Project

General

Profile

« Previous | Next » 

Revision f56b1626

Added by Andreas Kohlbecker over 10 years ago

solving #3377 (search results on only one classification should never show the classifiation information)

View differences:

7.x/modules/cdm_dataportal/theme/cdm_dataportal.page.theme
400 400
  }
401 401
  $out .= '<form name="pageoptions"><div id="showThumbnails"><input type="checkbox" name="showThumbnails" ' . (do_showThumbnails() == 1 ? 'checked="checked"' : '') . '> ' . t('Show Thumbnails') . '</div></form>';
402 402
  $out .= '</div>';
403
  $out .= '<div id="search-summary">' . t('results for') . ' ';
403

  
404 404
  $classification = cdm_dataportal_searched_in_classification();
405
  if ($classification != NULL) {
406
    $out .=  $classification->titleCache ;
407
  } else {
408
   $out .= t('any classification');
405

  
406
  if (  count(cdm_ws_get(CDM_WS_PORTAL_TAXONOMY)) > 1 ) {
407
    $out .= '<div id="search-summary">' . t('results for') . ' ';
408
    if ($classification != NULL) {
409
      $out .=  $classification->titleCache ;
410
    } else {
411
     $out .= t('any classification');
412
    }
413
    $out .= ':</div>';
409 414
  }
410
  $out .= ':</div>';
411 415

  
412 416
  // List results.
413 417
  if (isset($pager->records) && count($pager->records) > 0) {
......
425 429
        'path' => $path,
426 430
        'parameters' => $_REQUEST,
427 431
    ));
428
  }
429
  else {
432
  } else {
430 433
    $out .= '<h4 class="error">Sorry, no matching entries found.</h4>';
431 434
  }
432 435
  return $out;

Also available in: Unified diff