Skip to content

eprintsug/dimensions-badge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

EPrints::Plugin::Screen::EPrint::Box::DimensionsBadge

DESCRIPTION

By default this module will render a box on the EPrint summary page that will be populated with a Dimensions badge if the item has an appropraite identifier, and there is some Dimensions data for the item.

There is also an EPScript method that can be called on an EPrint e.g. in a citation file. This allows a test to be conducted to see if the EPrint has enough data to make a Dimensions badge applicable, and also to render the badge. This can be used if the default EPrints Boxes are not used for rendering the summary page:

<epc:if test="$item.dimensions_badge(1)">
  <div id="summary_dimensions" class="summary-widget">
    <h2>Dimensions</h2>
    <epc:print expr="$item.dimensions_badge()" />
  </div>
</epc:if>

Calling the method without a value will render the badge: <epc:print expr="$item.dimensions_badge()" />

Passing a parameter to the method will return a boolean to show whether the badge could be rendered: <epc:if test="$item.dimensions_badge(1)">

The display of the badge can be altered by updating the configuration in the z_dimensions_badge.pl configuration file.

For a full description of the Dimensions badge, please see https://badge.dimensions.ai/.

If you want to use the 'hide zero citations' option for the badge, please read the notes in z_dimensions_badge.pl. There is a javascript file included with this plugin but you may wish to add it to the 'auto' directory, or include a different javascript file if you are using any custom rendering. Please see #1 for some additional details.

BUGS

Please view https://github.com/eprintsug/dimensions-badge/issues/ for details of any known bugs, or to submit reports of any bugs you have discovered.

AVAILABILITY

This module should be available via the EPrints Bazaar https://bazaar.eprints.org/.

The code lives at https://github.com/eprintsug/dimensions-badge/.

AUTHOR

John Salter https://orcid.org/0000-0002-8611-8266 - https://github.com/jesusbagpuss/