Revision 31b96b91
Added by Andreas Kohlbecker over 9 years ago
7.x/modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme | ||
---|---|---|
619 | 619 |
|
620 | 620 |
// FIXME $feature_block_settings should be passed as parameter!!!!! |
621 | 621 |
$feature_block_settings = get_feature_block_settings($feature_uuid); |
622 |
$do_references_inline = $feature_block_settings['sources_as_content']; |
|
623 | 622 |
|
624 | 623 |
// FIXME remove this hack --------------------------- |
625 | 624 |
$default_theme = variable_get('theme_default', NULL); |
... | ... | |
646 | 645 |
$element_text = str_replace("\n", "<br/>", $element->multilanguageText_L10n->text); |
647 | 646 |
} |
648 | 647 |
|
649 |
$annotations_and_sources = handle_annotations_and_sources($element, $do_references_inline, $feature_block_settings, $element_text, $footnote_list_key_suggestion);
|
|
648 |
$annotations_and_sources = handle_annotations_and_sources($element, $feature_block_settings, $element_text, $footnote_list_key_suggestion); |
|
650 | 649 |
|
651 | 650 |
$names_used_in_source_markup = ''; |
652 | 651 |
if (!empty($annotations_and_sources['names_used_in_source']) && empty($element_text)) { |
... | ... | |
667 | 666 |
|
668 | 667 |
/** |
669 | 668 |
* @param $element |
670 |
* @param $do_references_inline |
|
671 | 669 |
* @param $feature_block_settings |
672 | 670 |
* @param $element_text |
673 | 671 |
* @param $footnote_list_key_suggestion |
... | ... | |
681 | 679 |
* |
682 | 680 |
* |
683 | 681 |
*/ |
684 |
function handle_annotations_and_sources($element, $do_references_inline, $feature_block_settings, $element_text, $footnote_list_key_suggestion) {
|
|
682 |
function handle_annotations_and_sources($element, $feature_block_settings, $element_text, $footnote_list_key_suggestion) { |
|
685 | 683 |
$annotations_and_sources = array( |
686 | 684 |
'foot_note_keys' => NULL, |
687 | 685 |
'source_references' => array(), |
688 | 686 |
'names_used_in_source' => array() |
689 | 687 |
); |
690 | 688 |
|
691 |
if ($do_references_inline) {
|
|
689 |
if ($feature_block_settings['sources_as_content']) {
|
|
692 | 690 |
foreach ($element->sources as $source) { |
693 | 691 |
|
694 | 692 |
$referenceCitation = theme('cdm_OriginalSource', |
... | ... | |
744 | 742 |
|
745 | 743 |
} // END of references inline |
746 | 744 |
|
747 |
if (!$do_references_inline || $feature_block_settings['sources_as_content_to_bibliography']) {
|
|
745 |
if (!$feature_block_settings['sources_as_content'] || $feature_block_settings['sources_as_content_to_bibliography']) {
|
|
748 | 746 |
$annotations_and_sources['foot_note_keys'] = cdm_create_description_element_footnotes($element, ',', $footnote_list_key_suggestion); |
749 | 747 |
return $annotations_and_sources; |
750 | 748 |
} |
... | ... | |
1061 | 1059 |
RenderHints::pushToRenderStack('descriptionElementDistribution'); |
1062 | 1060 |
RenderHints::setFootnoteListKey(UUID_DISTRIBUTION); |
1063 | 1061 |
|
1062 |
$feature_block_settings = get_feature_block_settings(UUID_DISTRIBUTION); |
|
1063 |
|
|
1064 | 1064 |
foreach ($descriptionElements as $descriptionElement) { |
1065 |
$footnote_key_list_str = cdm_create_description_element_footnotes($descriptionElement); |
|
1065 |
$annotations_and_sources = handle_annotations_and_sources( |
|
1066 |
$descriptionElement, |
|
1067 |
$feature_block_settings, |
|
1068 |
$descriptionElement->area->representation_L10n, |
|
1069 |
UUID_DISTRIBUTION |
|
1070 |
); |
|
1071 |
|
|
1066 | 1072 |
|
1067 | 1073 |
$out .= '<' . $enclosingTag . ' class="descriptionElement descriptionElement-' . $descriptionElement->uuid . '">' |
1068 |
. $descriptionElement->area->representation_L10n . $footnote_key_list_str
|
|
1074 |
. $descriptionElement->area->representation_L10n . $annotations_and_sources['foot_note_keys']
|
|
1069 | 1075 |
. ' </' . $enclosingTag . '>'; |
1070 | 1076 |
} |
1071 | 1077 |
|
Also available in: Unified diff
removing old bibliography block which was originally dveloped for palmweb