From ee8300dccc9b8939b484dad17bcc66dda7008357 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Tue, 9 Dec 2014 13:16:20 -0500 Subject: [PATCH] No Jira issue. Faux property listing was not displaying all cases of a property where the labels were the same but the domains were different. --- .../controller/freemarker/ListFauxPropertiesController.java | 5 ++--- .../body/siteAdmin/siteAdmin-fauxPropertiesList.ftl | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListFauxPropertiesController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListFauxPropertiesController.java index f2303bfcb..409575826 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListFauxPropertiesController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListFauxPropertiesController.java @@ -118,7 +118,6 @@ public class ListFauxPropertiesController extends FreemarkerHttpServlet { ObjectProperty op = opIt.next(); String baseURI = op.getURI(); fauxProps = fpDao.getFauxPropertiesForBaseUri(baseURI); - if ( fauxProps != null ) { Iterator fpIt = fauxProps.iterator(); if ( !fpIt.hasNext()) { @@ -152,7 +151,7 @@ public class ListFauxPropertiesController extends FreemarkerHttpServlet { tmpHash.put("domain", domainLabel); tmpHash.put("domainURI", domainURI); // add the faux and its details to the treemap - theFauxProps.put(fauxLabel, tmpHash); + theFauxProps.put(fauxLabel + "@@" + domainLabel, tmpHash); } } } @@ -208,7 +207,7 @@ public class ListFauxPropertiesController extends FreemarkerHttpServlet { tmpHash.put("domain", domainLabel); tmpHash.put("domainURI", domainURI); // add the faux and its details to the treemap - fauxForGivenBase.put(fauxLabel, tmpHash); + fauxForGivenBase.put(fauxLabel + "@@" + domainLabel, tmpHash); } fauxByBaseProps.put(baseLabel, fauxForGivenBase); } diff --git a/webapp/web/templates/freemarker/body/siteAdmin/siteAdmin-fauxPropertiesList.ftl b/webapp/web/templates/freemarker/body/siteAdmin/siteAdmin-fauxPropertiesList.ftl index 748197437..3f3260eb4 100644 --- a/webapp/web/templates/freemarker/body/siteAdmin/siteAdmin-fauxPropertiesList.ftl +++ b/webapp/web/templates/freemarker/body/siteAdmin/siteAdmin-fauxPropertiesList.ftl @@ -34,7 +34,7 @@ <#assign ks = fauxProps[key] />
- ${key} + ${key?substring(0,key?index_of("@@"))}
@@ -76,7 +76,7 @@ - +
${i18n().faux_property_capitalized}:${k2}${k2?substring(0,k2?index_of("@@"))}
${i18n().group_capitalized}: