393 |
393 |
$referenceUri = FALSE;
|
394 |
394 |
}
|
395 |
395 |
$out_taxon_part = render_taxon_or_name($taxon, $taxonUri, $referenceUri, TRUE, FALSE, $skip_tags, $is_invalid);
|
396 |
|
$taxon_footnotes = render_entities_annotations_as_footnote_keys([$taxon->name,$taxon], $footnoteListKey);
|
|
396 |
|
|
397 |
// must come before the rendering the relationships so that the footnote key
|
|
398 |
// numbers are in correct order
|
|
399 |
$taxon_and_name_footnotes = render_taxon_and_name_footnotes($taxon);
|
|
400 |
|
397 |
401 |
$name_relations = cdm_name_relationships_for_taxon($taxon);
|
398 |
402 |
$name_relations_render_array = compose_name_relationships_inline($name_relations, $taxon->name->uuid, $taxon->uuid);
|
399 |
403 |
|
400 |
404 |
$out = '<span class="relation_sign" title="' . $reltype_representation . '">' . $relsign . '</span>'
|
401 |
|
. $out_taxon_part . $taxon_footnotes;
|
|
405 |
. $out_taxon_part . $taxon_and_name_footnotes;
|
402 |
406 |
if(isset($name_relations_render_array['list']['items'][0])){
|
403 |
407 |
$out .= ' ' . drupal_render($name_relations_render_array);
|
404 |
408 |
}
|
... | ... | |
410 |
414 |
return $out;
|
411 |
415 |
}
|
412 |
416 |
|
|
417 |
/**
|
|
418 |
* Convenience function to create footnotes of annotations and sources for a
|
|
419 |
* taxon and name at the same time. Calls handle_annotations_and_sources()
|
|
420 |
* internally twice and combines the resulting footnote markup
|
|
421 |
*
|
|
422 |
* @param $taxon
|
|
423 |
*
|
|
424 |
* @return string
|
|
425 |
*
|
|
426 |
* @see synonymy_annotations_and_source_config()
|
|
427 |
*/
|
|
428 |
function render_taxon_and_name_footnotes($taxon) {
|
|
429 |
$annotations_and_sources_taxon = handle_annotations_and_sources(
|
|
430 |
$taxon,
|
|
431 |
synonymy_annotations_and_source_config(),
|
|
432 |
'',
|
|
433 |
RenderHints::getFootnoteListKey()
|
|
434 |
);
|
|
435 |
$annotations_and_sources_name = handle_annotations_and_sources(
|
|
436 |
$taxon->name,
|
|
437 |
synonymy_annotations_and_source_config(),
|
|
438 |
'',
|
|
439 |
RenderHints::getFootnoteListKey()
|
|
440 |
);
|
|
441 |
$footnotes = $annotations_and_sources_taxon['foo_note_keys'] .
|
|
442 |
($annotations_and_sources_taxon['foo_note_keys'] && $annotations_and_sources_name['foo_note_keys'] ? ',' : '') .
|
|
443 |
$annotations_and_sources_name['foo_note_keys'];
|
|
444 |
return $footnotes;
|
|
445 |
}
|
|
446 |
|
413 |
447 |
|
414 |
448 |
/**
|
415 |
449 |
* Creates markup for a taxon which is the accepted of another one
|
... | ... | |
571 |
605 |
}
|
572 |
606 |
$out .= '<span class="classifications"><span class="separator"> : </span>' . implode(', ', $classification_titles) . '</span>';
|
573 |
607 |
}
|
574 |
|
$out .= render_entities_annotations_as_footnote_keys([$taxon]);
|
|
608 |
$out .= render_taxon_and_name_footnotes($taxon);
|
575 |
609 |
if ($showMedia_synonyms) {
|
576 |
610 |
$out .= theme('cdm_taxon_list_thumbnails', array('taxon' => $acceptedTaxon));
|
577 |
611 |
}
|
... | ... | |
599 |
633 |
}
|
600 |
634 |
$out .= '<span class="classifications"><span class="separator"> : </span>' . implode(', ', $classification_titles) . '</span>';
|
601 |
635 |
}
|
602 |
|
$out .= render_entities_annotations_as_footnote_keys([$taxon]);
|
|
636 |
$out .= render_taxon_and_name_footnotes($taxon);
|
603 |
637 |
|
604 |
638 |
if ($showMedia_taxa) {
|
605 |
639 |
$out .= theme('cdm_taxon_list_thumbnails', array('taxon' => $taxon));
|
ref #8543 unification of annotation and source footnotes for related taxa etc.