From 1343966884bedb738772f0f537cbbf5c44ab8c15 Mon Sep 17 00:00:00 2001 From: Stefan-Wolff Date: Thu, 28 Jun 2018 18:27:52 +0200 Subject: [PATCH] [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 --- .../body/partials/individual/propStatement-doi.ftl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-doi.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-doi.ftl index fba5531f..e3a56853 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-doi.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-doi.ftl @@ -10,8 +10,15 @@ <@showStatement statement property /> <#macro showStatement statement property> - ${statement.value!} - <@lmt.addCitationMetaTag uri=(property.uri!) content=(statement.value!) /> + <#assign doi = (statement.value!).toLowerCase(). + 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> + ${doiUrl} + <@lmt.addCitationMetaTag uri=(property.uri!) content=(doiUrl) />