diff --git a/config/example.runtime.properties b/config/example.runtime.properties index 69f66f6e..68113d49 100644 --- a/config/example.runtime.properties +++ b/config/example.runtime.properties @@ -217,6 +217,34 @@ VitroConnection.DataSource.validationQuery = SELECT 1 # OTHER OPTIONS # ----------------------------------------------------------------------------- + # AltMetric badges + # ---------------- + # Options to embed AltMetric badges on information resource (e.g. journal article) pages + # See the AltMetric documentation for more imformation about each option: http://api.altmetric.com/embeds.html + # The embed code will use a DOI, or PubMed ID, if present + + # Enable AltMetric badges +resource.altmetric=enabled + + # Display the badge to the left or right of the title (default = right) + # Options: left, right +#resource.altmetric.displayto=right + + # Badge type to display (default = donut) + # Options: See AltMetric documentation - recommended settings: donut, medium-donut +#resource.altmetric.badge-type=donut + + # Hide the badge if there are no mentions (default = true) + # Options: true, false +#resource.altmetric.hide-no-mentions=true + + # Display more details about the score when you hover over the badge (default = right) + # Options, right, left, up, down +#resource.altmetric.badge-popover=right + + # Dsiplay extended details alongside the badge (default = none) +#resource.altmetric.badge-details=right + # # When the following flag is set to enabled, the VIVO home page displays a # global map highlighting the geographical focus of foaf:person individuals. diff --git a/productMods/templates/freemarker/body/individual/individual.ftl b/productMods/templates/freemarker/body/individual/individual.ftl index 6089d97b..79a900b4 100644 --- a/productMods/templates/freemarker/body/individual/individual.ftl +++ b/productMods/templates/freemarker/body/individual/individual.ftl @@ -5,6 +5,10 @@ <#include "individual-setup.ftl"> <#import "lib-vivo-properties.ftl" as vp> +<#assign individualProductExtensionPreHeader> + <#include "individual-altmetric.ftl"> +#assign> + <#assign individualProductExtension> <#-- Include for any class specific template additions --> ${classSpecificExtension!} @@ -39,3 +43,4 @@ ${stylesheets.add('')} ${scripts.add('')} +${scripts.add('')} \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-altmetric.ftl b/productMods/templates/freemarker/body/partials/individual/individual-altmetric.ftl new file mode 100644 index 00000000..79aa81fb --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-altmetric.ftl @@ -0,0 +1,38 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Overview on individual profile page --> + +<#if altmetricEnabled??> + <#assign doi = propertyGroups.getProperty("http://purl.org/ontology/bibo/doi")!> + <#if doi?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <#if doi.statements[0]??> +