From 4b52ccd6872d30e29165ec3f2bef9dbc98347220 Mon Sep 17 00:00:00 2001 From: hudajkhan Date: Tue, 13 Aug 2013 15:26:57 -0400 Subject: [PATCH] updates to remove debugging statements, etc. --- .../body/partials/individual/individual-positions.ftl | 2 +- .../body/partials/individual/individual-researchAreas.ftl | 4 +--- productMods/templates/freemarker/edit/forms/js/addConcept.js | 2 +- .../generators/AddAssociatedConceptGenerator.java | 3 ++- .../preprocessors/AddAssociatedConceptsPreprocessor.java | 4 +++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl b/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl index c0816bba..b74aab68 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl @@ -1,6 +1,6 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#-- List of positions for the individual -->

Positions!${core}personInPosition

+<#-- List of positions for the individual --> <#assign positions = propertyGroups.pullProperty("${core}personInPosition")!> <#if positions?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <#assign localName = positions.localName> diff --git a/productMods/templates/freemarker/body/partials/individual/individual-researchAreas.ftl b/productMods/templates/freemarker/body/partials/individual/individual-researchAreas.ftl index e01938d7..aaabeb05 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-researchAreas.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-researchAreas.ftl @@ -3,8 +3,6 @@ <#-- List of research areas for the individual --> <#assign researchAreas = propertyGroups.pullProperty("${core}hasResearchArea")!> <#assign concepts = propertyGroups.pullProperty("${core}hasAssociatedConcept")!> -<#if concepts?has_content> concepts has content <#else> concepts dont have content -

RESEARCH AREAS: ${core}hasResearchArea

<#if researchAreas?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <#assign localName = researchAreas.localName>

@@ -14,5 +12,5 @@

<#else> Research areas does not have content + diff --git a/productMods/templates/freemarker/edit/forms/js/addConcept.js b/productMods/templates/freemarker/edit/forms/js/addConcept.js index 4c882f33..d650d349 100644 --- a/productMods/templates/freemarker/edit/forms/js/addConcept.js +++ b/productMods/templates/freemarker/edit/forms/js/addConcept.js @@ -281,7 +281,7 @@ var addConceptForm = { generateIndividualLabelsDisplay:function(label, altLabels) { var labelDisplay = label; if(altLabels != null && altLabels.length > 0) { - labelDisplay += "
(" + altLabels + ")"; + labelDisplay += "
[" + altLabels + "]"; } return labelDisplay; }, diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java index 84b29774..a06fe85a 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java @@ -323,7 +323,8 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements private void addPreprocessors(EditConfigurationVTwo editConfiguration, WebappDaoFactory wadf) { //An Edit submission preprocessor for enabling addition of multiple terms for a single search - + //TODO: Check if this is the appropriate way of getting model + editConfiguration.addEditSubmissionPreprocessor( new AddAssociatedConceptsPreprocessor(editConfiguration, wadf)); diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/AddAssociatedConceptsPreprocessor.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/AddAssociatedConceptsPreprocessor.java index b49b9b45..22359108 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/AddAssociatedConceptsPreprocessor.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/AddAssociatedConceptsPreprocessor.java @@ -377,7 +377,9 @@ public class AddAssociatedConceptsPreprocessor extends //Check if system has an individual with this URI // List individualsWithLabel = this.wadf.getIndividualDao().getIndividualsByDataProperty(RDFS.label.getURI(), label); - //We are only interested in concepts + //We are only interested in semantic type objects and this may return multiple elements (perhaps too many? + //getting the model requires servlet and context and we don't want to pass that here do we//Return all semantic type objects with this label + //this.modelSelector. return null; }