diff --git a/_layouts/bib.liquid b/_layouts/bib.liquid index a54aaa611816..5b58600e2a60 100644 --- a/_layouts/bib.liquid +++ b/_layouts/bib.liquid @@ -249,9 +249,20 @@ {% endif %} {% if site.enable_publication_badges %} - {% assign entry_has_altmetric_badge = entry.altmetric or entry.doi or entry.eprint or entry.pmid or entry.isbn %} - {% assign entry_has_dimensions_badge = entry.dimensions or entry.doi or entry.pmid %} - {% assign entry_has_google_scholar_badge = entry.google_scholar_id %} + {% assign entry_has_altmetric_badge = false %} + {% if entry.altmetric and entry.altmetric != 'false' %} + {% assign entry_has_altmetric_badge = true %} + {% endif %} + + {% assign entry_has_dimensions_badge = false %} + {% if entry.dimensions and entry.dimensions != 'false' %} + {% assign entry_has_dimensions_badge = true %} + {% endif %} + + {% assign entry_has_google_scholar_badge = false %} + {% if entry.google_scholar_id %} + {% assign entry_has_google_scholar_badge = true %} + {% endif %} {% if entry_has_altmetric_badge or entry_has_dimensions_badge or entry_has_google_scholar_badge %}
{% if site.enable_publication_badges.altmetric and entry_has_altmetric_badge %} @@ -261,12 +272,14 @@ data-hide-less-than="15" data-badge-type="2" data-badge-popover="right" - {% if entry.eprint %} + {% if entry.altmetric != blank and entry.altmetric != 'true' %} + data-altmetric-id="{{ entry.altmetric }}" + {% elsif entry.arxiv %} + data-arxiv-id="{{ entry.arxiv }}" + {% elsif entry.eprint %} data-arxiv-id="{{ entry.eprint }}" {% elsif entry.doi %} data-doi="{{ entry.doi }}" - {% elsif entry.altmetric %} - data-altmetric-id="{{ entry.altmetric }}" {% elsif entry.pmid %} data-pmid="{{ entry.pmid }}" {% elsif entry.isbn %} @@ -277,12 +290,12 @@ {% if site.enable_publication_badges.dimensions and entry_has_dimensions_badge %}