[VIVO-1527] Providing DOI as URL

* handle doi url (#74)

don't add "https://doi.org/" if the full URL is given

* add dx.doi.org to DOI URL handling

* Update propStatement-doi.ftl

* use DOI URL as link text

while DOI URL is used as link target, now its also used as link text
This commit is contained in:
Stefan-Wolff 2018-06-28 18:27:52 +02:00 committed by Ben
parent d5934d2e40
commit 1343966884

View file

@ -10,8 +10,15 @@
<@showStatement statement property /> <@showStatement statement property />
<#macro showStatement statement property> <#macro showStatement statement property>
<a href="https://doi.org/${statement.value!}" title="${i18n().doi_link}" target="_blank">${statement.value!}</a> <#assign doi = (statement.value!).toLowerCase().
<@lmt.addCitationMetaTag uri=(property.uri!) content=(statement.value!) /> replace("http://doi.org/", "").
replace("https://doi.org/", "").
replace("http://dx.doi.org/", "").
replace("https://dx.doi.org/", "").
replace("doi:", "").trim()>
<#assign doiUrl = "https://doi.org/" + doi>
<a href="${doiUrl}" title="${i18n().doi_link}" target="_blank">${doiUrl}</a>
<@lmt.addCitationMetaTag uri=(property.uri!) content=(doiUrl) />
</#macro> </#macro>