diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/IndividualsForClassesDataGetter.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/IndividualsForClassesDataGetter.java index 4e40a8a11..1c2bc7d6c 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/IndividualsForClassesDataGetter.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/IndividualsForClassesDataGetter.java @@ -80,7 +80,7 @@ public class IndividualsForClassesDataGetter extends DataGetterBase implements D protected Map getClassIntersectionsMap(Model displayModel) { QuerySolutionMap initBindings = new QuerySolutionMap(); - initBindings.add("dataGetterURI", ResourceFactory.createResource(this.dataGetterURI)); + initBindings.add("dataGetterUri", ResourceFactory.createResource(this.dataGetterURI)); try { QueryExecution qexec = QueryExecutionFactory.create( dataGetterQuery, displayModel , initBindings); Map classesAndRestrictions = new HashMap(); diff --git a/webapp/web/WEB-INF/ontologies/app/menu.n3 b/webapp/web/WEB-INF/ontologies/app/menu.n3 index 4f4542760..f59cf99b7 100644 --- a/webapp/web/WEB-INF/ontologies/app/menu.n3 +++ b/webapp/web/WEB-INF/ontologies/app/menu.n3 @@ -3,6 +3,7 @@ @prefix owl: . @prefix display: . @prefix rdf: . +@prefix rdfs: . ### This file defines the default menu for vitro. ### diff --git a/webapp/web/templates/freemarker/edit/forms/pageManagement--browseClassGroupsScripts.ftl b/webapp/web/templates/freemarker/edit/forms/pageManagement--browseClassGroupsScripts.ftl index 51b361c19..c1a14f2b4 100644 --- a/webapp/web/templates/freemarker/edit/forms/pageManagement--browseClassGroupsScripts.ftl +++ b/webapp/web/templates/freemarker/edit/forms/pageManagement--browseClassGroupsScripts.ftl @@ -2,4 +2,4 @@ <#-- Scripts for class group browsing --> <#--Replaces Vitro's processing for individuals for classes with VIVO's processing internal classes--> ${scripts.add('')} -${scripts.add('')} +${scripts.add('')} diff --git a/webapp/web/templates/freemarker/edit/forms/pageManagement--classIntersections.ftl b/webapp/web/templates/freemarker/edit/forms/pageManagement--classIntersections.ftl new file mode 100644 index 000000000..aebc00d54 --- /dev/null +++ b/webapp/web/templates/freemarker/edit/forms/pageManagement--classIntersections.ftl @@ -0,0 +1,2 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + diff --git a/webapp/web/templates/freemarker/edit/forms/pageManagement.ftl b/webapp/web/templates/freemarker/edit/forms/pageManagement.ftl index 113b49c61..efe42090c 100644 --- a/webapp/web/templates/freemarker/edit/forms/pageManagement.ftl +++ b/webapp/web/templates/freemarker/edit/forms/pageManagement.ftl @@ -1,5 +1,5 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#import "lib-vivo-form.ftl" as lvf> +<#import "lib-vitro-form.ftl" as lvf> <#--------Set up variables--------> <#assign pageData = editConfiguration.pageData /> diff --git a/webapp/web/templates/freemarker/lib/lib-vitro-form.ftl b/webapp/web/templates/freemarker/lib/lib-vitro-form.ftl new file mode 100644 index 000000000..a330d3ca5 --- /dev/null +++ b/webapp/web/templates/freemarker/lib/lib-vitro-form.ftl @@ -0,0 +1,95 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Macros and functions for form controls --> + +<#-- Output: html notifying the user that the browser is an unsupported version --> +<#macro unsupportedBrowser urlsBase> +
+
+ Alert Icon +

This form is not supported in versions of Internet Explorer below version 8. Please upgrade your browser, or + switch to another browser, such as FireFox.

+
+
+ + +<#--Given an edit configuration template object, get the current value for a uri field using the field name--> + + +<#function getEditConfigLiteralValue config varName> + <#local literalValues = config.existingLiteralValues > + <#if (literalValues?keys?seq_contains(varName)) && (literalValues[varName]?size > 0)> + <#return literalValues[varName][0] > + + <#return ""> + + +<#--Given an edit configuration template object, get the current value for a literal field using the field name--> + +<#function getEditConfigUriValue config varName> + <#local uriValues = config.existingUriValues /> + <#if (uriValues?keys?seq_contains(varName)) && (uriValues[varName]?size > 0)> + <#return uriValues[varName][0] > + + <#return ""> + + +<#--Now check whether a given value returns either a uri or a literal value, if one empty then use other and +return - returns empty string if no value found--> +<#function getEditConfigValue config varName> + <#local returnValue = getEditConfigUriValue(config, varName) /> + <#if (returnValue?length = 0)> + <#local returnValue = getEditConfigLiteralValue(config, varName) /> + + <#return returnValue> + + + +<#--Given edit submission object find values--> +<#function getEditSubmissionLiteralValue submission varName> + <#local literalValues = submission.literalsFromForm > + <#if (literalValues?keys?seq_contains(varName)) && (literalValues[varName]?size > 0)> + <#return literalValues[varName][0] > + + <#return ""> + + +<#--Given an edit configuration template object, get the current value for a literal field using the field name--> + +<#function getEditSubmissionUriValue submission varName> + <#local uriValues = submission.urisFromForm /> + <#if (uriValues?keys?seq_contains(varName)) && (uriValues[varName]?size > 0)> + <#return uriValues[varName][0] > + + <#return ""> + + +<#--Get edit submission value for either literal or uri--> +<#function getEditSubmissionValue submission varName> + <#local returnValue = getEditSubmissionUriValue(submission, varName) /> + <#if (returnValue?length = 0)> + <#local returnValue = getEditSubmissionLiteralValue(submission, varName) /> + + <#return returnValue> + + +<#--Get the value for the form field, checking edit submission first and then edit configuration--> +<#function getFormFieldValue submission config varName> + <#local returnValue = ""> + <#if submission?has_content && submission.submissionExists = true> + <#local returnValue = getEditSubmissionValue(submission varName)> + <#else> + <#local returnValue = getEditConfigValue(config varName)> + + <#return returnValue> + + +<#--Check if submission error exists for a field name--> +<#function submissionErrorExists editSubmission fieldName> + <#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> + <#if editSubmission.validationErrors?keys?seq_contains(fieldName)> + <#return true> + + + <#return false> +