From 9228694bd48c7e40cc83549a98b3d13f8b6e66b1 Mon Sep 17 00:00:00 2001 From: manolobevia Date: Wed, 4 May 2011 20:30:27 +0000 Subject: [PATCH] NIHVIVO-2597: Created template to handle contact properties (email and phone) in individual--foaf-person.ftl --- .../individual/individual--foaf-person.ftl | 32 +---------------- .../individual/individual-contactInfo.ftl | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 31 deletions(-) create mode 100644 productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl index 3a564425..1f8a32cf 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl @@ -38,37 +38,7 @@ - <#-- Email --> - <#assign email = propertyGroups.getPropertyAndRemoveFromList("${core}email")!> - <#if email?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> - <@p.addLinkWithLabel email editable /> - <#if email.statements?has_content> <#-- if there are any statements --> - - - - - <#-- Phone --> - <#assign phone = propertyGroups.getPropertyAndRemoveFromList("${core}phoneNumber")!> - <#if phone?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> - <@p.addLinkWithLabel phone editable /> - <#if phone.statements?has_content> <#-- if there are any statements --> - - - + <#include "individual-contactInfo.ftl"> <#-- Links --> <@p.vitroLinks propertyGroups namespaces editable "individual-urls-people" /> diff --git a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl new file mode 100644 index 00000000..892538ed --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl @@ -0,0 +1,35 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Contact info on individual profile page --> + +<#-- Email --> +<#assign email = propertyGroups.getPropertyAndRemoveFromList("${core}email")!> +<#if email?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <@p.addLinkWithLabel email editable /> + <#if email.statements?has_content> <#-- if there are any statements --> + + + + +<#-- Phone --> +<#assign phone = propertyGroups.getPropertyAndRemoveFromList("${core}phoneNumber")!> +<#if phone?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <@p.addLinkWithLabel phone editable /> + <#if phone.statements?has_content> <#-- if there are any statements --> + + + \ No newline at end of file