Skip to content
Plugin to render a Dimensions badge on EPrint summary page
Perl
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cfg/cfg.d
lib
LICENSE
README.pod
dimensions-badge.epm
dimensions-badge.epmi

README.pod

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 https://github.com/eprintsug/dimensions-badge/issues/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/

You can’t perform that action at this time.