From f344c92dff3843d6d6d92ef37079c0a4087f2894 Mon Sep 17 00:00:00 2001 From: ryounes Date: Wed, 6 Jul 2011 17:09:55 +0000 Subject: [PATCH] NIHVIVO-2449 Remove vitro:moniker from individual profile, and display preferredTitle instead, falling back to mostSpecificTypes. --- .../individual/individual--foaf-person.ftl | 19 +++++++++++++++---- .../individual/individual-contactInfo.ftl | 4 ++-- .../individual/individual-overview.ftl | 2 +- themes/wilma/css/wilma.css | 4 ++-- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl index a18fefc9..faf1be46 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl @@ -73,13 +73,24 @@ <#-- Label --> <@p.label individual editable /> - <#-- Most-specific types --> - <@p.mostSpecificTypes individual /> + <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> + <#assign title = propertyGroups.pullProperty("${core}preferredTitle")!> + <#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <@p.addLinkWithLabel title editable /> + <#list title.statements as statement> + ${statement.value} + <@p.editingLinks "${title.name}" statement editable /> + + + <#-- If preferredTitle is unpopulated, display mostSpecificTypes --> + <#if ! (title.statements)?has_content> + <@p.mostSpecificTypes individual /> + <#-- Positions --> - <#assign positions = propertyGroups.getPropertyAndRemoveFromList("${core}personInPosition")!> + <#assign positions = propertyGroups.pullProperty("${core}personInPosition")!> <#if positions?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <@p.objectPropertyListing positions editable /> @@ -89,7 +100,7 @@ <#include "individual-overview.ftl"> <#-- Research Areas --> - <#assign researchAreas = propertyGroups.getPropertyAndRemoveFromList("${core}hasResearchArea")!> + <#assign researchAreas = propertyGroups.pullProperty("${core}hasResearchArea")!> <#if researchAreas?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <@p.objectPropertyListing researchAreas editable /> diff --git a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl index 359132ea..3ff43688 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl @@ -9,7 +9,7 @@ <@emailLinks "${core}email" /> <#-- Phone --> -<#assign phone = propertyGroups.getPropertyAndRemoveFromList("${core}phoneNumber")!> +<#assign phone = propertyGroups.pullProperty("${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 --> @@ -25,7 +25,7 @@ <#macro emailLinks property> - <#assign email = propertyGroups.getPropertyAndRemoveFromList(property)!> + <#assign email = propertyGroups.pullProperty(property)!> <#if property == "${core}primaryEmail"> <#local listId = "primary-email"> <#local label = "Primary Email"> diff --git a/productMods/templates/freemarker/body/partials/individual/individual-overview.ftl b/productMods/templates/freemarker/body/partials/individual/individual-overview.ftl index b67e17f7..584bcbc9 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-overview.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-overview.ftl @@ -10,7 +10,7 @@
${statement.value}
- <@p.editingLinks "${overview.localName}" statement editable /> + <@p.editingLinks "${overview.name}" statement editable /> \ No newline at end of file diff --git a/themes/wilma/css/wilma.css b/themes/wilma/css/wilma.css index 3dd818e1..739f7c74 100644 --- a/themes/wilma/css/wilma.css +++ b/themes/wilma/css/wilma.css @@ -1190,7 +1190,7 @@ nav#alpha-browse-container { font-size: 1.375em; color: #2485ae; } -#individual-intro span.most-specific-type { +#individual-intro span.display-title { font-size: .825em; color: #5e6363; border-left: 1px solid #A6B1B0; @@ -1260,7 +1260,7 @@ ul.individual-urls-people li a { color: #2485ae; line-height: 1.3em; } -h1.fn .most-specific-type { +h1.fn .display-title { font-size: .825em; color: #5e6363; border-left: 1px solid #a6b1b0;