[VIVO-1315] Plum print integration (#52)
This commit is contained in:
parent
b0536a4721
commit
bc5b119c12
7 changed files with 105 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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 .
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<#include "individual-setup.ftl">
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>')}
|
||||
${scripts.add('<script type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
|
||||
|
||||
<#--
|
||||
First, check to see if profile page types are enabled. If not, get the 2 column template:
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
<#assign individualProductExtensionPreHeader>
|
||||
<#include "individual-altmetric.ftl">
|
||||
<#include "individual-plum.ftl">
|
||||
</#assign>
|
||||
|
||||
<#assign individualProductExtension>
|
||||
|
@ -44,3 +45,4 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/indi
|
|||
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.truncator.js"></script>')}
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/individualUtils.js"></script>')}
|
||||
${scripts.add('<script type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>')}
|
||||
${scripts.add('<script type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
|
||||
|
|
|
@ -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>
|
||||
<#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>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#if plumIdParam??>
|
||||
<div class="individual-plum-print" style="float: ${plumPrintDisplayTo}; position: relative; z-index: 1;">
|
||||
<a class="plumx-plum-print-popup"
|
||||
href="https://plu.mx/plum/a/?${plumIdParam}"
|
||||
data-popup="${plumPrintPopover}"
|
||||
data-hide-when-empty="${plumPrintHideEmpty}"
|
||||
data-site="plum" data-size="${plumPrintSize}"
|
||||
data-badge="false" data-popover="true"></a>
|
||||
</div>
|
||||
</#if>
|
||||
</#if>
|
|
@ -125,6 +125,32 @@
|
|||
</#if>
|
||||
</#local>
|
||||
|
||||
${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>
|
||||
<#if plumIdParam??>
|
||||
<div class="plum-print-wrapper" style="display: inline-block">
|
||||
<a class="plumx-plum-print-popup"
|
||||
href="https://plu.mx/plum/a/?${plumIdParam}"
|
||||
data-popup="hidden"
|
||||
data-hide-when-empty="${plumPrintHideEmpty}"
|
||||
data-site="plum"
|
||||
data-badge="true"></a>
|
||||
</div>
|
||||
</#if>
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
${resourceTitle} ${citationDetails} <@dt.yearSpan "${statement.dateTime!}" /> ${altMetric} ${plum}
|
||||
</#if>
|
||||
</#macro>
|
||||
|
|
|
@ -176,7 +176,8 @@ ${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/in
|
|||
'<script type="text/javascript" src="${urls.base}/js/individual/moreLessController.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.12.1.min.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/imageUpload/imageUploadUtils.js"></script>',
|
||||
'<script type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>')}
|
||||
'<script type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>',
|
||||
'<script type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
|
||||
|
||||
<script type="text/javascript">
|
||||
i18n_confirmDelete = "${i18n().confirm_delete}";
|
||||
|
|
Loading…
Add table
Reference in a new issue