diff --git a/home/src/main/resources/config/example.runtime.properties b/home/src/main/resources/config/example.runtime.properties index 7824185a..341ea9ab 100644 --- a/home/src/main/resources/config/example.runtime.properties +++ b/home/src/main/resources/config/example.runtime.properties @@ -255,6 +255,31 @@ VitroConnection.DataSource.validationQuery = SELECT 1 # Dsiplay extended details alongside the badge (default = none) #resource.altmetric.badge-details=right + # Plum prints + # ---------------- + # Options to embed Plum prints on information resource (e.g. journal article) pages + # The embed code will use a DOI, PubMed ID, ISBN, or OCLC number, if present + + # Enable Plum prints + # Uncomment and set this to disabled if you don't want Plum prints +#resource.plum-print=disabled + + # Display the badge to the left or right of the title (default = right) + # Options: left, right +#resource.plum-print.displayto=right + + # Hide the print if there are no metrics (default = true) + # Options: true, false +#resource.plum-print.hide-when-empty=true + + # Display more details about the score when you hover over the print (default = right) + # Options: right, left, top, bottom, hidden +#resource.plum-print.popover=right + + # Size of the print (default = medium) + # Options: tiny, small, medium, large +#resource.plum-print.size=medium + # # 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/webapp/src/main/webapp/config/listViewConfig-authorInAuthorship.xml b/webapp/src/main/webapp/config/listViewConfig-authorInAuthorship.xml index 7cdd44aa..5db8e495 100644 --- a/webapp/src/main/webapp/config/listViewConfig-authorInAuthorship.xml +++ b/webapp/src/main/webapp/config/listViewConfig-authorInAuthorship.xml @@ -44,6 +44,7 @@ OPTIONAL { ?infoResource bibo:pmid ?pmid } OPTIONAL { ?infoResource bibo:isbn10 ?isbn10 } OPTIONAL { ?infoResource bibo:isbn13 ?isbn13 } + OPTIONAL { ?infoResource bibo:oclc ?oclc } OPTIONAL { ?infoResource core:placeOfPublication ?locale } OPTIONAL { @@ -103,6 +104,7 @@ ?infoResource bibo:pmid ?pmid . ?infoResource bibo:isbn10 ?isbn10 . ?infoResource bibo:isbn13 ?isbn13 . + ?infoResource bibo:oclc ?oclc . ?infoResource core:placeOfPublication ?locale . ?infoResource bibo:reproducedIn ?appearsInObj . ?appearsInObj rdfs:label ?appearsIn . @@ -217,6 +219,14 @@ ?infoResource bibo:isbn13 ?isbn13 . } UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource bibo:oclc ?oclc . + } + UNION { ?subject ?property ?authorship . ?authorship a core:Authorship . diff --git a/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person.ftl b/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person.ftl index 4ff99149..f697e2b1 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person.ftl @@ -22,6 +22,7 @@ <#include "individual-setup.ftl"> ${scripts.add('')} +${scripts.add('')} <#-- First, check to see if profile page types are enabled. If not, get the 2 column template: diff --git a/webapp/src/main/webapp/templates/freemarker/body/individual/individual.ftl b/webapp/src/main/webapp/templates/freemarker/body/individual/individual.ftl index e1e26cce..2634a056 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/individual/individual.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/individual/individual.ftl @@ -7,6 +7,7 @@ <#assign individualProductExtensionPreHeader> <#include "individual-altmetric.ftl"> + <#include "individual-plum.ftl"> <#assign individualProductExtension> @@ -44,3 +45,4 @@ ${stylesheets.add('')} ${scripts.add('')} ${scripts.add('')} +${scripts.add('')} diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-plum.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-plum.ftl new file mode 100644 index 00000000..79992b84 --- /dev/null +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-plum.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 plumPrintEnabled??> + <#assign doi = propertyGroups.getProperty("http://purl.org/ontology/bibo/doi")!> + <#if doi?has_content && doi.statements[0]??> + <#assign plumIdParam = "doi=${doi.statements[0].value}"> + <#else> + <#assign pmid = propertyGroups.getProperty("http://purl.org/ontology/bibo/pmid")!> + <#if pmid?has_content && pmid.statements[0]??> + <#assign plumIdParam = "pmid=${pmid.statements[0].value}"> + <#else> + <#assign isbn = propertyGroups.getProperty("http://purl.org/ontology/bibo/isbn13")!> + <#if !(isbn?has_content && isbn.statements[0]??)> + <#assign isbn = propertyGroups.getProperty("http://purl.org/ontology/bibo/isbn10")!> + + <#if isbn?has_content && isbn.statements[0]??> + <#assign plumIdParam = "isbn=${isbn.statements[0].value}"> + <#else> + <#assign oclc = propertyGroups.getProperty("http://purl.org/ontology/bibo/oclcnum")!> + <#if oclc?has_content && oclc.statements[0]??> + <#assign plumIdParam = "oclc=${oclc.statements[0].value}"> + + + + + <#if plumIdParam??> +
+ +
+ + diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl index 3e3c332d..9786f51d 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl @@ -125,6 +125,32 @@ - ${resourceTitle} ${citationDetails} <@dt.yearSpan "${statement.dateTime!}" /> ${altMetric} + <#local plum> + <#if plumPrintEnabled??> + <#if statement.doi??> + <#assign plumIdParam = "doi=${statement.doi}"> + <#elseif statement.pmid??> + <#assign plumIdParam = "pmid=${statement.pmid}"> + <#elseif statement.isbn10??> + <#assign plumIdParam = "isbn=${statement.isbn10}"> + <#elseif statement.isbn13??> + <#assign plumIdParam = "isbn=${statement.isbn13}"> + <#elseif statement.oclc??> + <#assign plumIdParam = "oclc=${statement.oclc}"> + + <#if plumIdParam??> +
+ +
+ + + + + ${resourceTitle} ${citationDetails} <@dt.yearSpan "${statement.dateTime!}" /> ${altMetric} ${plum} diff --git a/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl b/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl index 63229476..20ceb298 100644 --- a/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl +++ b/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl @@ -176,7 +176,8 @@ ${scripts.add('', '', '', - '')} + '', + '')}