Browse Source

Fix endnote display when no reference link.

fix
Alexander O'Neill 6 years ago
parent
commit
29d8eecf91
  1. 19
      bibcite_footnotes.module
  2. 8
      css/reference_footnote.css

19
bibcite_footnotes.module

@ -113,16 +113,21 @@ function bibcite_footnotes_preprocess_bibcite_footnote_list(&$variables) {
}
if ($fn['ibid']) {
$build['#type'] = 'markup';
$build['#markup'] = ' <span class="endnote-text"><span class="ibid">'
$build['footnote-text'] = [
'#type' => 'markup',
'#markup' => ' <span class="endnote-text"><span class="ibid">'
. t('Ibid') . '.</span>'
. (!empty($fn['page']) ? ', ' . $fn['page'] : '')
. '</span>';
. '</span>',
];
}
else if (!empty($fn['text']) && $variables['note_type'] == ReferenceFootnotesFilter::ENDNOTE) {
$build['#type'] = 'markup';
$build['#markup'] = ' <span class="endnote-text">' . $fn['text'] . '</span>';
$build['footnote-link'] = Link::fromTextAndUrl($fn['value'], $url)->toRenderable();
$build['footnote-text'] = [
'#type' => 'markup',
'#markup' => ' <span class="endnote-text">' . $fn['text'] . '</span>',
];
}
if (!empty($reference_entity_id)) {
@ -139,8 +144,8 @@ function bibcite_footnotes_preprocess_bibcite_footnote_list(&$variables) {
$item['sort'] = trim(strip_tags(render($citation_build)));
}
$item['#markup'] = $render;
$notes['#items'][] = $item;
// $item['#markup'] = $render;
$notes['#items'][] = $build;
$reference_entity_id = FALSE;
$render = FALSE;
}

8
css/reference_footnote.css

@ -1,10 +1,10 @@
.footnotes .footnote .footnote-link,
.footnotes .footnote .footnote-multi {
.footnote-list .footnotes .footnote-link,
.footnote-list .footnotes .footnote-multi {
float: left;
}
.footnotes .footnote .footnote-link::after,
.footnotes .footnote .footnote-multi::after {
.footnote-list .footnotes .footnote-link::after,
.footnote-list .footnotes .footnote-multi::after {
content: " ";
white-space: pre;
}
Loading…
Cancel
Save