Project

General

Profile

Revision 6eaec849

ID6eaec8496bd0ce44b1ac261c6d0db7c3734f951d
Parent 9a7fc46c
Child 55a557d8

Added by Katja Luther over 1 year ago

implement blast search table for the result

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.page.theme
334 334

  
335 335

  
336 336
/**
337
 * Returns HTML for the given result page including a pager.
338
 *
339
 * @param array $variables
340
 *   An associative array containing:
341
 *   - pager: TODO
342
 *   - path: The target path for the pager links, this will usually point to
343
 *     'cdm_dataportal/search/results/taxon'
344
 *
345
 * @return string
346
 *  Markup for the result page
347
 *
348
 * @throws Exception
349
 *
350
 * @ingroup themeable
351
 */
352
function theme_cdm_search_specimen_results($variables)
353
{
354
    $pager = $variables['pager'];
355
    $path = $variables['path'];
356

  
357

  
358

  
359
    // Add thumbnails checkbox and refine search link.
360
    $out = '<div class="page_options">';
361
    //if (isset($_REQUEST['ws'])) {
362
     //   if (cdm_dataportal_search_form_path_for_ws($_REQUEST['ws'])) {
363
     //       $out .= '<div id="backButton">' . l(t('Modify search'), cdm_dataportal_search_form_path_for_ws($_REQUEST['ws'])) . '</div>';
364
     //   }
365
    //}
366
    if (variable_get(SEARCH_RESULTS_SHOW_THUMBNAIL_CHECKBOX, SEARCH_RESULTS_SHOW_THUMBNAIL_CHECKBOX_DEFAULT)) {
367
        $out .= '<form name="pageoptions"><div id="showThumbnails"><input class="showThumbnails" type="checkbox" name="showThumbnails" ' . (do_showThumbnails() == 1 ? 'checked="checked"' : '') . '> ' . t('Display image thumbnails') . '</div></form>';
368
    }
369
    $out .= '</div>';
370

  
371

  
372

  
373

  
374

  
375

  
376
    // List results.
377
    if (isset($pager->data) ) {
378
        $data = json_decode($pager->data, true);
379
        $out .= '<div id="search_results">';
380
        $list_of_result = compose_table_of_blast_result($data);
381
        $out .= $list_of_result;
382
        $out .= '</div>';
383
       // $out .= theme('cdm_pager', array(
384
       //     'pager' => $pager,
385
       //     'path' => $path,
386
       //     'parameters' => $_REQUEST,
387
        //));
388
    } else {
389
        $out .= '<h4 class="error">' . t('Sorry, no matching entries found.') . '</h4>';
390
    }
391
    return $out;
392
}
393

  
394

  
395
/**
337 396
 * TODO Implementation of Hook taxon_image_gallery()
338 397
 *
339 398
 * @param object $taxon

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)