From 277f7dc3ba280f4ccadc21f37952382483d2bdfd Mon Sep 17 00:00:00 2001 From: rjy7 Date: Tue, 11 Jan 2011 17:03:56 +0000 Subject: [PATCH] NIHVIVO-1332 Modifications to controller, template models, and templates for editing controls --- .../individual/individual--foaf-person.ftl | 36 ++++++++++--------- .../partials/individual/individual-setup.ftl | 15 ++++++++ 2 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 productMods/templates/freemarker/body/partials/individual/individual-setup.ftl diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl index 4c14133a..9c20326f 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl @@ -2,19 +2,11 @@ <#-- Template for profile page for individuals of type foaf:Person --> -<#import "lib-list.ftl" as l> -<#import "lib-properties.ftl" as p> -<#assign core = "http://vivoweb.org/ontology/core#"> +<#include "individual-setup.ftl"> -<#assign editingClass> - <#if editStatus.showEditingLinks>editing<#else> - - -<#if editStatus.showAdminPanel> +<#if individual.showAdminPanel> <#include "individual-adminPanel.ftl"> - -<#assign propertyGroups = individual.propertyList>
@@ -23,7 +15,7 @@ <#-- Thumbnail --> <#if individual.thumbUrl??> ${individual.name} - <#elseif individual.person> + <#else> placeholder image @@ -41,7 +33,10 @@ <#if email?has_content> @@ -51,7 +46,10 @@ <#if phone?has_content> @@ -88,7 +86,7 @@ <#if positions?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->

Positions

@@ -97,7 +95,10 @@ <#assign overview = propertyGroups.getPropertyAndRemoveFromList("${core}overview")!> <#if overview?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <#list overview.statements as statement> -

${statement.value}

+

+ <@p.editingLinks statement showEditingLinks /> + ${statement.value} +

@@ -106,7 +107,7 @@ <#if researchAreas?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->

Research Areas

@@ -136,8 +137,9 @@
+<#assign nameForOtherGroup = "other"> <#-- used by both individual-propertyGroupMenu.ftl and individual-properties.ftl --> + <#-- Property group menu --> -<#assign nameForOtherGroup = "other"> <#include "individual-propertyGroupMenu.ftl"> <#-- Ontology properties --> diff --git a/productMods/templates/freemarker/body/partials/individual/individual-setup.ftl b/productMods/templates/freemarker/body/partials/individual/individual-setup.ftl new file mode 100644 index 00000000..791e8df2 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-setup.ftl @@ -0,0 +1,15 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Setup needed by all individual templates --> + +<#import "lib-list.ftl" as l> +<#import "lib-properties.ftl" as p> +<#assign core = "http://vivoweb.org/ontology/core#"> + +<#assign showEditingLinks = individual.showEditingLinks> + +<#assign editingClass> + <#if showEditingLinks>editing + + +<#assign propertyGroups = individual.propertyList> \ No newline at end of file