|
|
|
@ -69,7 +69,7 @@ function bibcite_footnotes_preprocess_footnote_list(&$variables) {
|
|
|
|
|
], |
|
|
|
|
]; |
|
|
|
|
$build = []; |
|
|
|
|
$reference_entity_id = _bibcite_footnotes_get_reference_entity_id_from_bibcite_footnote($fn['text']); |
|
|
|
|
$reference_entity_id = _bibcite_footnotes_get_reference_entity_id_from_bibcite_footnote($fn['reference']); |
|
|
|
|
|
|
|
|
|
$footnote_link_text = $dont_show_backlink_text && $reference_entity_id ? '^' : $fn['value']; |
|
|
|
|
if (!is_array($fn['ref_id'])) { |
|
|
|
@ -99,8 +99,21 @@ function bibcite_footnotes_preprocess_footnote_list(&$variables) {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!empty($fn['text'])) { |
|
|
|
|
$note_build[] = $build + ['#type' => 'markup', '#markup' => ' ' . $fn['text']]; |
|
|
|
|
if (!empty($reference_entity_id)) { |
|
|
|
|
$citation_build = $citation_tools->getRenderableReference($reference_entity_id); |
|
|
|
|
$note_build[] = $citation_build; |
|
|
|
|
} |
|
|
|
|
$note_item = [] + $item; |
|
|
|
|
$note_item['#markup'] = render($note_build); |
|
|
|
|
|
|
|
|
|
$notes['#items'][] = $note_item; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!empty($reference_entity_id)) { |
|
|
|
|
$citation_build = $citation_tools->getRenderableReference($reference_entity_id); |
|
|
|
|
|
|
|
|
|
$build[] = $citation_build; |
|
|
|
|
$render = render($build); |
|
|
|
|
$item['#markup'] = $render; |
|
|
|
@ -108,13 +121,7 @@ function bibcite_footnotes_preprocess_footnote_list(&$variables) {
|
|
|
|
|
$references['#items'][] = $item; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
$build[] = ['#type' => 'markup', '#markup' => ' ' . $fn['text']]; |
|
|
|
|
$render = render($build); |
|
|
|
|
$item['#markup'] = $render; |
|
|
|
|
|
|
|
|
|
$notes['#items'][] = $item; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$variables['notes'] = $notes; |
|
|
|
@ -149,7 +156,7 @@ function bibcite_footnotes_preprocess_footnote_link(&$variables) {
|
|
|
|
|
$class = 'see-footnote'; |
|
|
|
|
// Generate the hover text |
|
|
|
|
$citation_tools = new CitationTools(); |
|
|
|
|
$citation_entity_id = _bibcite_footnotes_get_reference_entity_id_from_bibcite_footnote($fn['text']); |
|
|
|
|
$citation_entity_id = _bibcite_footnotes_get_reference_entity_id_from_bibcite_footnote($fn['reference']); |
|
|
|
|
$citation_data = $citation_tools->getRenderableReference($citation_entity_id); |
|
|
|
|
|
|
|
|
|
// Citation contains a page reference, so construct parenthetical footnote. |
|
|
|
|