From 10c1a243050bfdbedb6029dd33f3214870990fca Mon Sep 17 00:00:00 2001 From: hudajkhan Date: Thu, 5 Feb 2015 10:36:04 -0500 Subject: [PATCH 1/3] VIVO-955 adding a flag already present in customFormWithAutocomplete's logic to clear out the label field for a URI that already exists --- .../freemarker/edit/forms/addUserDefinedConcept.ftl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/productMods/templates/freemarker/edit/forms/addUserDefinedConcept.ftl b/productMods/templates/freemarker/edit/forms/addUserDefinedConcept.ftl index 4eb91608..9fbac50f 100644 --- a/productMods/templates/freemarker/edit/forms/addUserDefinedConcept.ftl +++ b/productMods/templates/freemarker/edit/forms/addUserDefinedConcept.ftl @@ -7,6 +7,10 @@ <#assign sparqlForAcFilter = editConfiguration.pageData.sparqlForAcFilter /> +<#--This flag is for clearing the label field on submission for an existing object being selected from autocomplete. +Set this flag on the input acUriReceiver where you would like this behavior to occur. --> +<#assign flagClearLabelForExisting = "flagClearLabelForExisting" /> +

${i18n().create_own_concept_all_caps}

<@lvf.unsupportedBrowser urls.base /> @@ -26,7 +30,7 @@ (${i18n().verify_match_capitalized} ${i18n().or} ${i18n().change_selection})

- +
@@ -54,7 +58,8 @@ typeName: 'Concept', defaultTypeName: 'concept', // used in repair mode to generate button text baseHref: '${urls.base}/individual?uri=', - limitToConceptClasses:["http://www.w3.org/2004/02/skos/core#Concept"] + limitToConceptClasses:["http://www.w3.org/2004/02/skos/core#Concept"], + flagClearLabelForExisting: '${flagClearLabelForExisting}' }; var i18nStrings = { selectAnExisting: '${i18n().select_an_existing}', From 5c0e031af87e7624fe1c6755b8b1550e5c734a65 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Fri, 6 Feb 2015 12:35:33 -0500 Subject: [PATCH 2/3] VIVO-960: vcard Individuals now display correctly on the manage authors page and can have their rank in the authorship list modified. --- .../freemarker/edit/forms/addAuthorsToInformationResource.ftl | 2 +- .../generators/AddAuthorsToInformationResourceGenerator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/productMods/templates/freemarker/edit/forms/addAuthorsToInformationResource.ftl b/productMods/templates/freemarker/edit/forms/addAuthorsToInformationResource.ftl index f7a1c460..93429bd6 100644 --- a/productMods/templates/freemarker/edit/forms/addAuthorsToInformationResource.ftl +++ b/productMods/templates/freemarker/edit/forms/addAuthorsToInformationResource.ftl @@ -192,7 +192,7 @@ var i18nStrings = { authorTypeText: '${i18n().author_capitalized}', organizationTypeText: '${i18n().organization_capitalized}', helpTextSelect: '${i18n().select_an_existing}', - helptextAdd: '${i18n().or_add_new_one}' + helpTextAdd: '${i18n().or_add_new_one}' }; diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAuthorsToInformationResourceGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAuthorsToInformationResourceGenerator.java index ae864185..3854a999 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAuthorsToInformationResourceGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAuthorsToInformationResourceGenerator.java @@ -360,7 +360,7 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator + " OPTIONAL { ?authorURI rdfs:label ?authorName } \n" + " OPTIONAL { ?authorshipURI core:rank ?rank } \n" + "} UNION { \n" - + " core:relatedBy ?authorshipURI . \n" + + " ?subject core:relatedBy ?authorshipURI . \n" + " ?authorshipURI a core:Authorship . \n" + " ?authorshipURI core:relates ?authorURI . \n" + " ?authorURI a vcard:Individual . \n" From 862ff2f9fe12f8dca3d65f8090c6916cf43c6947 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Fri, 6 Feb 2015 12:37:38 -0500 Subject: [PATCH 3/3] fixed variable name linked to javascript issue --- .../freemarker/edit/forms/addEditorsToInformationResource.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/productMods/templates/freemarker/edit/forms/addEditorsToInformationResource.ftl b/productMods/templates/freemarker/edit/forms/addEditorsToInformationResource.ftl index 4bd7bc51..1df9b064 100644 --- a/productMods/templates/freemarker/edit/forms/addEditorsToInformationResource.ftl +++ b/productMods/templates/freemarker/edit/forms/addEditorsToInformationResource.ftl @@ -162,7 +162,7 @@ var i18nStrings = { removeEditorshipAlert: '${i18n().error_processing_editor_request}', editorTypeText: '${i18n().editor_capitalized}', helpTextSelect: '${i18n().select_an_existing}', - helptextAdd: '${i18n().or_add_new_one}' + helpTextAdd: '${i18n().or_add_new_one}' };