Updates to enable deletion of object individuals for vcard editing

This commit is contained in:
hudajkhan 2013-11-11 18:28:11 -05:00
parent 5d19e746e1
commit 769b53e919
4 changed files with 42 additions and 10 deletions

View file

@ -32,7 +32,7 @@
<input type="hidden" name="predicateUri" value="${editConfiguration.predicateUri}" role="input" />
<input type="hidden" name="domainUri" value="${editConfiguration.domainUri}" role="input" />
<input type="hidden" name="rangeUri" value="${editConfiguration.rangeUri}" role="input" />
<input type="hidden" name="deleteObjectUri" value="${editConfiguration.customDeleteObjectUri}" />
<#if editConfiguration.dataProperty = true>
<input type="hidden" name="datapropKey" value="${editConfiguration.datapropKey}" role="input" />
<input type="hidden" name="vitroNsProp" value="${editConfiguration.vitroNsProperty}" role="input" />

View file

@ -205,6 +205,20 @@ name will be used as the label. -->
<#macro deleteLink propertyLocalName propertyName statement>
<#local url = statement.deleteUrl>
<#if url?has_content>
<#--We need to specify the actual object to be deleted as it is different from the object uri-->
<#if propertyLocalName?contains("ARG_2000028")>
<#if propertyName?contains("mailing address")>
<#local url = url + "&deleteObjectUri=" + "${statement.address!}">
<#elseif propertyName?contains("phone") || propertyName?contains("fax")>
<#local url = url + "&deleteObjectUri=" + "${statement.phone!}">
<#elseif propertyName?contains("primary email") || propertyName?contains("additional emails")>
<#local url = url + "&deleteObjectUri=" + "${statement.email!}">
<#elseif propertyName?contains("full name")>
<#local url = url + "&deleteObjectUri=" + "${statement.fullName!}">
<#elseif propertyName?contains("preferred title")>
<#local url = url + "&deleteObjectUri=" + "${statement.title!}">
</#if>
</#if>
<@showDeleteLink propertyLocalName url />
</#if>
</#macro>