Revision 20bfe15b
Added by Andreas Kohlbecker over 4 years ago
modules/cdm_dataportal/includes/name.inc | ||
---|---|---|
253 | 253 |
* |
254 | 254 |
* @param $taxonName |
255 | 255 |
* cdm TaxonName instance |
256 |
* @param $nameLink
|
|
256 |
* @param $name_link
|
|
257 | 257 |
* URI to the taxon, @see path_to_taxon(), must be processed by url() before passing to this method |
258 |
* @param $refenceLink
|
|
258 |
* @param $reference_link
|
|
259 | 259 |
* URI to the reference, @see path_to_reference(), must be processed by url() before passing to this method |
260 | 260 |
* @param $show_annotations |
261 | 261 |
* turns the display of annotations on |
... | ... | |
273 | 273 |
* The markup for a taxon name. |
274 | 274 |
* |
275 | 275 |
*/ |
276 |
function render_taxon_or_name($taxon_name_or_taxon_base, $nameLink = NULL, $refenceLink = NULL,
|
|
276 |
function render_taxon_or_name($taxon_name_or_taxon_base, $name_link = NULL, $reference_link = NULL,
|
|
277 | 277 |
$show_annotations = true, $is_type_designation = false, $skiptags = array(), $is_invalid = false) { |
278 | 278 |
|
279 | 279 |
$is_doubtful = false; |
... | ... | |
294 | 294 |
} |
295 | 295 |
|
296 | 296 |
|
297 |
$renderTemplate = get_nameRenderTemplate(RenderHints::getRenderPath(), $nameLink, $refenceLink);
|
|
297 |
$renderTemplate = get_nameRenderTemplate(RenderHints::getRenderPath(), $name_link, $reference_link);
|
|
298 | 298 |
$partDefinition = get_partDefinition($taxonName->nameType); |
299 | 299 |
|
300 | 300 |
// Apply definitions to template. |
... | ... | |
499 | 499 |
$descriptionHtml = ''; |
500 | 500 |
if (array_setr('description', TRUE, $renderTemplate)) { |
501 | 501 |
$descriptions = cdm_ws_get(CDM_WS_PORTAL_NAME_DESCRIPTIONS, $taxonName->uuid); |
502 |
foreach ($descriptions as $description) { |
|
503 |
if (!empty($description)) { |
|
504 |
foreach ($description->elements as $description_element) { |
|
505 |
$second_citation = ''; |
|
506 |
if (isset($description_element->multilanguageText_L10n) && $description_element->multilanguageText_L10n->text) { |
|
507 |
$second_citation = '[& ' . $description_element->multilanguageText_L10n->text . '].'; |
|
508 |
} |
|
509 |
$descriptionHtml .= $second_citation; |
|
510 |
$descriptionHtml .= cdm_description_element_media( |
|
511 |
$description_element, |
|
512 |
array( |
|
513 |
'application/pdf', |
|
514 |
'image/png', |
|
515 |
'image/jpeg', |
|
516 |
'image/gif', |
|
517 |
'text/html', |
|
518 |
) |
|
519 |
); |
|
502 |
if($descriptions){ |
|
503 |
foreach ($descriptions as $description) { |
|
504 |
if (!empty($description)) { |
|
505 |
foreach ($description->elements as $description_element) { |
|
506 |
$second_citation = ''; |
|
507 |
if (isset($description_element->multilanguageText_L10n) && $description_element->multilanguageText_L10n->text) { |
|
508 |
$second_citation = '[& ' . $description_element->multilanguageText_L10n->text . '].'; |
|
509 |
} |
|
510 |
$descriptionHtml .= $second_citation; |
|
511 |
$descriptionHtml .= cdm_description_element_media( |
|
512 |
$description_element, |
|
513 |
array( |
|
514 |
'application/pdf', |
|
515 |
'image/png', |
|
516 |
'image/jpeg', |
|
517 |
'image/gif', |
|
518 |
'text/html', |
|
519 |
) |
|
520 |
); |
|
520 | 521 |
|
522 |
} |
|
521 | 523 |
} |
522 | 524 |
} |
523 | 525 |
} |
Also available in: Unified diff
fix #8779 harmonization of taxon display in descriptions