moved weblink changes from VIVO to Vitro (#101)

Related to: Related to: https://jira.duraspace.org/browse/VIVO-1619
This commit is contained in:
Don Elsborg 2019-01-08 07:49:12 -07:00 committed by Andrew Woods
parent 129e1219a8
commit ad24dc306d
2 changed files with 13 additions and 4 deletions

View file

@ -6,16 +6,20 @@
is also used to generate the property statement during a deletion. is also used to generate the property statement during a deletion.
--> -->
<#import "lib-datetime.ftl" as dt> <#import "lib-datetime.ftl" as dt>
<#import "lib-meta-tags.ftl" as lmt>
<#if property.rangeDatatypeURI?? && property.rangeDatatypeURI?contains("#")> <#if property.rangeDatatypeURI?? && property.rangeDatatypeURI?contains("#")>
<#assign datatype = property.rangeDatatypeURI?substring(property.rangeDatatypeURI?last_index_of("#")+1) /> <#assign datatype = property.rangeDatatypeURI?substring(property.rangeDatatypeURI?last_index_of("#")+1) />
<#else> <#else>
<#assign datatype = "none" /> <#assign datatype = "none" />
</#if> </#if>
<@showStatement statement datatype /> <@showStatement statement property datatype />
<#macro showStatement statement property datatype>
<#macro showStatement statement datatype>
<#assign theValue = statement.value /> <#assign theValue = statement.value />
<#if datatype == "anyURI" && theValue?starts_with("http")>
<#assign theValue = "<a href=\"" + statement.value + "\" target=\"_blank\">" + statement.value + "</a>" />
</#if>
<#if theValue?contains("<ul>") > <#if theValue?contains("<ul>") >
<#assign theValue = theValue?replace("<ul>","<ul class='tinyMCEDisc'>") /> <#assign theValue = theValue?replace("<ul>","<ul class='tinyMCEDisc'>") />
</#if> </#if>
@ -43,6 +47,7 @@
<#else> <#else>
${theValue} <#if !datatype?contains("none")> <@validateFormat theValue datatype/> </#if> ${theValue} <#if !datatype?contains("none")> <@validateFormat theValue datatype/> </#if>
</#if> </#if>
<@lmt.addCitationMetaTag uri=(property.uri!) content=(theValue!) />
</#macro> </#macro>
<#macro validateFormat value datatype > <#macro validateFormat value datatype >
<#if datatype?? > <#if datatype?? >

View file

@ -0,0 +1,4 @@
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
<#macro addCitationMetaTag uri="" content="">
</#macro>