From 92566579f51cb786ac6f7eca6422afa21b8ccb73 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Fri, 17 Dec 2010 15:37:34 +0000 Subject: [PATCH] --- .../freemarker/body/individual/individual.ftl | 34 ++++++++++----- .../individual/individual-properties.ftl | 17 ++------ .../templates/freemarker/lib/lib-property.ftl | 43 ------------------- 3 files changed, 27 insertions(+), 67 deletions(-) delete mode 100644 webapp/web/templates/freemarker/lib/lib-property.ftl diff --git a/webapp/web/templates/freemarker/body/individual/individual.ftl b/webapp/web/templates/freemarker/body/individual/individual.ftl index 22d551deb..b58279656 100644 --- a/webapp/web/templates/freemarker/body/individual/individual.ftl +++ b/webapp/web/templates/freemarker/body/individual/individual.ftl @@ -2,7 +2,6 @@ <#-- Template for individual profile page --> -<#import "lib-property.ftl" as p> <#import "lib-list.ftl" as l> <#assign editingClass> @@ -117,15 +116,14 @@ @@ -150,3 +148,19 @@ ${headScripts.add("/js/jquery_plugins/getUrlParam.js", "/js/toggle.js")} ${scripts.add("/js/imageUpload/imageUploadUtils.js")} + +<#-- RY TEMPORARY Replace with Java method on group - pass "other" as a parameter --> +<#function groupName group> + <#if group.name??> + <#if group.name?has_content> + <#assign name = group.name> + <#else> + <#-- This is the group for properties not assigned to any group. It has an empty name. --> + <#assign name = "other"> + + <#else> + <#-- If there are no groups, a dummy group has been created with a null (as opposed to empty) name. --> + <#assign name = ""> + + <#return name> + diff --git a/webapp/web/templates/freemarker/body/partials/individual/individual-properties.ftl b/webapp/web/templates/freemarker/body/partials/individual/individual-properties.ftl index fdc69256a..3c61bae3d 100644 --- a/webapp/web/templates/freemarker/body/partials/individual/individual-properties.ftl +++ b/webapp/web/templates/freemarker/body/partials/individual/individual-properties.ftl @@ -4,24 +4,13 @@ <#list propertyGroups as group> - <#-- Get the group name --> - <#if group.name??> - <#if group.name?has_content> - <#assign groupName = group.name> - <#else> - <#-- This is the group for properties not assigned to any group. It has an empty name. --> - <#assign groupName = "other"> - - <#else> - <#-- If there are no groups, a dummy group has been created with a null (as opposed to empty) name. --> - <#assign groupName = ""> - + <#assign groupname = groupName(group)>
<#-- Display the group heading --> - <#if groupName?has_content> -

${groupName}

+ <#if groupname?has_content> +

${groupname}

<#-- List the properties in the group --> diff --git a/webapp/web/templates/freemarker/lib/lib-property.ftl b/webapp/web/templates/freemarker/lib/lib-property.ftl deleted file mode 100644 index 53fb2d0b1..000000000 --- a/webapp/web/templates/freemarker/lib/lib-property.ftl +++ /dev/null @@ -1,43 +0,0 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> - -<#-- Macros for display of individual properties --> - -<#-- - Macro: dataPropWrapper - - Wrap a dataproperty in the appropriate divs - - Usage: - <@dataPropWrapper id="myId" editStatus=true> - <#nested> - ---> - -<#macro dataPropWrapper id editStatus=false> -
-
- <#nested> -
-
- - -<#----------------------------------------------------------------------------> - -<#-- - Macro: dataPropsWrapper - - Wrap a dataproperty in the appropriate divs - - Usage: - <@dataPropsWrapper id="myId" editStatus=true> - <#nested> - ---> - -<#macro dataPropsWrapper id editStatus=false> -
- <@dataPropWrapper id=id editStatus=editStatus> - <#nested> - -
-