Revision 7a2a14b3
Added by Andreas Kohlbecker over 9 years ago
7.x/modules/cdm_dataportal/theme/cdm_dataportal.page.theme | ||
---|---|---|
131 | 131 |
} |
132 | 132 |
|
133 | 133 |
// --- GET specimensOrObservations --- // |
134 |
// Comment @WA Note the spelling error! |
|
135 |
$specimensOrObservations = cdm_ws_get(CDM_WS_TAXON, array( |
|
136 |
$taxon->uuid, |
|
137 |
'specimensOrObersvations', |
|
138 |
)); |
|
134 |
$specimensOrObservations = cdm_ws_get(CDM_WS_TAXON, array( $taxon->uuid, 'specimensOrObservations')); |
|
139 | 135 |
|
140 | 136 |
$specimensOrObservationsCount = is_array($specimensOrObservations) ? count($specimensOrObservations) : 0; |
141 | 137 |
if ($specimensOrObservationsCount == 0 || ($tabsToDisplay["Specimens"] == '0')) { |
... | ... | |
343 | 339 |
$taxon = $variables['taxon']; |
344 | 340 |
RenderHints::pushToRenderStack('taxon_page_specimens'); |
345 | 341 |
|
346 |
// Comment @WA: Note the spelling error. |
|
347 | 342 |
$specimensOrObservations = cdm_ws_get(CDM_WS_TAXON, array( |
348 | 343 |
$taxon->uuid, |
349 |
'specimensOrObersvations',
|
|
344 |
'specimensOrObservations',
|
|
350 | 345 |
)); |
351 | 346 |
|
352 | 347 |
// Collect media (fieldObjectMedia, derivedUnitMedia) and add as fields. |
... | ... | |
373 | 368 |
// os=&od=&legend=0&recalculate=false&image=false |
374 | 369 |
$occurrenceQuery = $occurrenceQuery->String; |
375 | 370 |
|
371 |
$legendFormatQueryStr = null; |
|
376 | 372 |
if (variable_get('cdm_dataportal_map_openlayers', 1)) { |
377 |
|
|
378 | 373 |
$out .= get_openlayers_map(variable_get('cdm_dataportal_geoservice_display_width', FALSE), variable_get('cdm_dataportal_geoservice_bounding_box', FALSE), $occurrenceQuery, NULL, |
379 |
// Comment @WA: not defined. |
|
380 |
// $legendFormatQueryStr, |
|
381 |
NULL, variable_get('cdm_dataportal_geoservice_map_caption', '')); |
|
374 |
$legendFormatQueryStr, variable_get('cdm_dataportal_geoservice_map_caption', '')); |
|
382 | 375 |
} |
383 | 376 |
else { |
384 | 377 |
// get_image_map($width, $occurrenceQuery = FALSE, $distributionQuery = FALSE, $legendFormatQuery = FALSE, $map_caption = FALSE ) |
385 | 378 |
$out .= get_image_map(variable_get('cdm_dataportal_geoservice_display_width', FALSE), variable_get('cdm_dataportal_geoservice_bounding_box', FALSE), $occurrenceQuery, NULL, |
386 |
// @WA: not defined |
|
387 |
// $legendFormatQueryStr, |
|
388 |
NULL, variable_get('cdm_dataportal_geoservice_map_caption', '')); |
|
379 |
$legendFormatQueryStr, variable_get('cdm_dataportal_geoservice_map_caption', '')); |
|
389 | 380 |
} |
390 | 381 |
} |
391 | 382 |
} |
... | ... | |
406 | 397 |
|
407 | 398 |
// --- Render the title cache. |
408 | 399 |
$out_row = '<tr class="descriptionElement descriptionElement_IndividualsAssociation ' . ($i % 2 ? 'odd' : 'even') . '">'; |
400 |
|
|
409 | 401 |
if ($specimensOrObservation->class != 'FieldObservation') { |
410 |
$label_html = cdm_dynabox($specimensOrObservation->titleCache, cdm_compose_url('portal/' . CDM_WS_DERIVEDUNIT_FACADE, array( |
|
411 |
$specimensOrObservation->uuid, |
|
412 |
)), 'cdm_derivedUnitFacade', 'Click for details', array( |
|
413 |
'div', |
|
414 |
'div', |
|
415 |
)); |
|
402 |
// details are loaded on request via the cdm_dynabox by AJAX |
|
403 |
$derived_unit_ws_request = cdm_compose_url('portal/' . CDM_WS_DERIVEDUNIT_FACADE, array( $specimensOrObservation->uuid)); |
|
404 |
$label_html = cdm_dynabox( |
|
405 |
$specimensOrObservation->titleCache, |
|
406 |
$derived_unit_ws_request, |
|
407 |
'cdm_derivedUnitFacade', |
|
408 |
'Click for details', |
|
409 |
array('div','div') |
|
410 |
); |
|
416 | 411 |
} |
417 | 412 |
else { |
418 | 413 |
$label_html = $specimensOrObservation->titleCache; |
... | ... | |
420 | 415 |
$out_row .= '<td>' . $label_html . '</td>'; |
421 | 416 |
|
422 | 417 |
// --- Render associated media. |
418 |
$gallery_html = ''; |
|
423 | 419 |
if (count($mediaList) > 0) { |
424 | 420 |
$gallery_settings = getGallerySettings(CDM_DATAPORTAL_SPECIMEN_GALLERY_NAME); |
425 | 421 |
$gallery_name = $specimensOrObservation->uuid; |
... | ... | |
432 | 428 |
'galleryName' => $gallery_name, |
433 | 429 |
'maxExtend' => $gallery_settings['cdm_dataportal_media_maxextend'], |
434 | 430 |
'cols' => $gallery_settings['cdm_dataportal_media_cols'], |
435 |
'maxRows' => $gallery_settings['cdm_dataportal_media_maxRows'],
|
|
431 |
'maxRows' => isset($gallery_settings['cdm_dataportal_media_maxRows']) ? isset($gallery_settings['cdm_dataportal_media_maxRows']) : null,
|
|
436 | 432 |
'captionElements' => $captionElements, |
437 | 433 |
'mediaLinkType' => 'LIGHTBOX', |
438 | 434 |
'alternativeMediaUri' => NULL, |
439 | 435 |
'galleryLinkUri' => NULL, |
440 | 436 |
)); |
441 | 437 |
} |
442 |
else { |
|
443 |
$gallery_html = ''; |
|
444 |
} |
|
445 | 438 |
$out_row .= '<td>' . $gallery_html . '</td></tr>'; |
446 | 439 |
$out_specimenList .= $out_row; |
447 | 440 |
} |
... | ... | |
859 | 852 |
|
860 | 853 |
$out .= '<div class="media cdm_media_viewer_image">'; |
861 | 854 |
|
862 |
// $out .= '<div class="viewer">'; |
|
863 | 855 |
$out .= theme('cdm_back_to_image_gallery_button', array()); |
864 | 856 |
$out .= '<div class="viewer">'; |
865 |
// $out .= theme('cdm_media_gallerie_image', $representation->parts[$partIdx], |
|
866 |
// $imageMaxExtend); |
|
867 | 857 |
$out .= theme('cdm_openlayers_image', array('mediaRepresentationPart' => $media->representations[$representationIdx]->parts[$partIdx], 'maxExtend' => $imageMaxExtend)); |
868 | 858 |
$out .= '</div>'; |
869 | 859 |
|
... | ... | |
889 | 879 |
// Representation(-part) specific metadata. |
890 | 880 |
$thumbnailMaxExtend = 100; |
891 | 881 |
$out .= '<table>'; |
892 |
// $out .= '<tr><th colspan="3">'.t('MimeType').': |
|
893 |
// '.$media->representations[$representationIdx]->mimeType.'</th></tr>'; |
|
894 | 882 |
$i = 0; |
895 | 883 |
foreach ($media->representations[$representationIdx]->parts as $part) { |
896 | 884 |
$out .= '<tr><th>' . t('Part') . ' ' . ($i + 1) . '</th><td>'; |
Also available in: Unified diff
fixing #3217 (specimens: rename label type into 'Basis of record') and solving a lot of problems like recursive page loading du to a bug in ahah-content.js and type in cdm service call, ...