Revision 61658f41
Added by Andreas Kohlbecker over 3 years ago
modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
719 | 719 |
} |
720 | 720 |
|
721 | 721 |
// handle annotations of the name and taxon |
722 |
$bibliography_settings = get_bibliography_settings(); |
|
723 |
$annotations_and_sources_config = [ |
|
724 |
'sources_as_content' => FALSE, |
|
725 |
'link_to_name_used_in_source' => TRUE, |
|
726 |
'link_to_reference' => TRUE, |
|
727 |
'add_footnote_keys' => TRUE, |
|
728 |
'bibliography_aware' => $bibliography_settings['enabled'] == 1 |
|
729 |
]; |
|
730 | 722 |
$annotations_and_sources_taxon = handle_annotations_and_sources( |
731 | 723 |
$taxon, |
732 |
$annotations_and_sources_config,
|
|
724 |
synonymy_annotations_and_source_config(),
|
|
733 | 725 |
'', |
734 | 726 |
RenderHints::getFootnoteListKey()); |
735 | 727 |
$annotations_and_sources_name = handle_annotations_and_sources( |
736 | 728 |
$taxon->name, |
737 |
$annotations_and_sources_config,
|
|
729 |
synonymy_annotations_and_source_config(),
|
|
738 | 730 |
'', |
739 | 731 |
RenderHints::getFootnoteListKey()); |
740 | 732 |
|
... | ... | |
775 | 767 |
return markup_to_render_array($out); |
776 | 768 |
} |
777 | 769 |
|
770 |
/** |
|
771 |
* Provides the default configuration for handle_annotations_and_sources() in the |
|
772 |
* synonymy. |
|
773 |
* |
|
774 |
* @return bool[] |
|
775 |
*/ |
|
776 |
function synonymy_annotations_and_source_config() { |
|
777 |
static $annotations_and_sources_config = null; |
|
778 |
if(!$annotations_and_sources_config){ |
|
779 |
$bibliography_settings = get_bibliography_settings(); |
|
780 |
$annotations_and_sources_config = [ |
|
781 |
'sources_as_content' => FALSE, |
|
782 |
'link_to_name_used_in_source' => TRUE, |
|
783 |
'link_to_reference' => TRUE, |
|
784 |
'add_footnote_keys' => TRUE, |
|
785 |
'bibliography_aware' => $bibliography_settings['enabled'] == 1 |
|
786 |
]; |
|
787 |
} |
|
788 |
return $annotations_and_sources_config; |
|
789 |
} |
|
790 |
|
|
778 | 791 |
|
779 | 792 |
/** |
780 | 793 |
* composes and returns an render array for the experts associated with the given taxon |
Also available in: Unified diff
ref #8543 unification of annotation and source footnotes in synonymy