Revision 1b756c5f
Added by Andreas Kohlbecker about 7 years ago
modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
713 | 713 |
} |
714 | 714 |
} |
715 | 715 |
|
716 |
$pseudo_feature_blocks = array(); |
|
717 |
$pseudo_feature_block_toc_items = array(); |
|
716 | 718 |
|
717 |
// Render the sections for each feature |
|
718 |
$render_array['taxon_description_features'] = compose_feature_blocks($merged_tree->root->childNodes, $taxon); |
|
719 | 719 |
|
720 |
// Render the sections for each real feature |
|
721 |
$feature_block_list = make_feature_block_list($merged_tree->root->childNodes, $taxon); |
|
722 |
|
|
723 |
// Bibliography |
|
720 | 724 |
$bibliography_settings = get_bibliography_settings(); |
721 | 725 |
if($bibliography_settings['enabled'] == 1){ |
722 |
$bibliography_block = feature_block(t('Bibliography')); |
|
723 |
$bibliography_block->content = FootnoteManager::renderFootnoteList('BIBLIOGRAPHY', ''); |
|
726 |
$feature_bibliography = make_pseudo_feature('Bibliography', 'BIBLIOGRAPHY'); |
|
727 |
$bibliography_block = feature_block(t('Bibliography'), $feature_bibliography); |
|
728 |
$bibliography_item = markup_to_render_array(FootnoteManager::renderFootnoteList('BIBLIOGRAPHY', '')); |
|
729 |
$bibliography_block->content[] = compose_feature_block_wrap_elements(array($bibliography_item), $feature_bibliography); |
|
724 | 730 |
|
725 | 731 |
if(!empty($bibliography_block->content)){ |
726 |
$render_array['taxon_description_bibliography'] = markup_to_render_array( |
|
727 |
theme('block', |
|
728 |
array( |
|
729 |
'elements' => array( |
|
730 |
'#block' => $bibliography_block, |
|
731 |
'#children' => $bibliography_block->content, |
|
732 |
) |
|
733 |
) |
|
734 |
), |
|
735 |
100 // weight |
|
736 |
); |
|
737 |
cdm_toc_list_add_item('Bibliography', 'bibliography'); |
|
732 |
$pseudo_feature_block_toc_items['Bibliography']= 'bibliography'; |
|
733 |
$pseudo_feature_blocks[] = $bibliography_block; |
|
738 | 734 |
} |
735 |
} |
|
736 |
|
|
737 |
$render_array['taxon_description_features'] = _block_get_renderable_array( |
|
738 |
array_merge($feature_block_list, $pseudo_feature_blocks) |
|
739 |
); |
|
739 | 740 |
|
741 |
if($pseudo_feature_block_toc_items){ |
|
742 |
foreach ($pseudo_feature_block_toc_items as $label=>$fragment){ |
|
743 |
cdm_toc_list_add_item($label, $fragment); |
|
744 |
} |
|
740 | 745 |
} |
741 | 746 |
|
742 | 747 |
// create the table of content |
Also available in: Unified diff
fix #6392 test for uses and use records and refactoring of the uses feature block