diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java index 6ff8bb3ac..893181950 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java @@ -75,9 +75,9 @@ public class ObjectPropertyDaoJena extends PropertyDaoJena implements ObjectProp namespaceFilters.add("afn:namespace(?property) != \"" + s + "\""); } // A hack to include the vitro:primaryLink and vitro:additionalLink properties in the list -// namespaceFilters.add("( ?property = ||" + -// "?property = ||" + -// "afn:namespace(?property) != \"http://vitro.mannlib.cornell.edu/ns/vitro/0.7#\" )"); + namespaceFilters.add("( ?property = ||" + + "?property = ||" + + "afn:namespace(?property) != \"http://vitro.mannlib.cornell.edu/ns/vitro/0.7#\" )"); propertyFilters = "FILTER (" + StringUtils.join(namespaceFilters, " && \n") + ")\n"; } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/GroupedPropertyList.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/GroupedPropertyList.java index 3b9efde18..e65748f30 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/GroupedPropertyList.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/GroupedPropertyList.java @@ -69,11 +69,7 @@ public class GroupedPropertyList extends BaseTemplateModel { // This may include properties that are not defined as "possible properties" for a subject of this class, // so we cannot just rely on getting that list. List objectPropertyList = subject.getPopulatedObjectPropertyList(); - // If we're going to create a new template model object property with a name, - // don't need to set editLabel, can just do this: - //propertyList.addAll(objectPropertyList); for (ObjectProperty op : objectPropertyList) { - //op.setLabel(op.getDomainPublic()); propertyList.add(op); } @@ -92,7 +88,6 @@ public class GroupedPropertyList extends BaseTemplateModel { // two working in parallel. List dataPropertyList = subject.getPopulatedDataPropertyList(); for (DataProperty dp : dataPropertyList) { - //dp.setLabel(dp.getPublicName()); propertyList.add(dp); } @@ -100,7 +95,7 @@ public class GroupedPropertyList extends BaseTemplateModel { mergeAllPossibleDataProperties(propertyList); } - sort(propertyList); //*** Does this do data and obj props, or just obj props?? + sort(propertyList); // Put the list into groups List propertyGroupList = addPropertiesToGroups(propertyList); diff --git a/webapp/web/templates/freemarker/body/partials/individual/individual-links.ftl b/webapp/web/templates/freemarker/body/partials/individual/individual-links.ftl deleted file mode 100644 index 8d2b0709d..000000000 --- a/webapp/web/templates/freemarker/body/partials/individual/individual-links.ftl +++ /dev/null @@ -1,29 +0,0 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> - -<#-- Template for links on individual profile - - Currently the page displays the vitro namespace links properties. Future versions - will use the vivo core ontology links property, eliminating the need for special handling. ---> - -<#assign vitroNs = "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"> -<#assign primaryLink = propertyGroups.getPropertyAndRemoveFromList("${vitroNs}primaryLink")!> -<#assign additionalLinks = propertyGroups.getPropertyAndRemoveFromList("${vitroNs}additionalLink")!> -<#assign linkListClass = linkListClass!"individual-urls"> - -<#if (primaryLink?has_content || additionalLinks?has_content)> <#-- true when the property is in the list, even if not populated (when editing) --> - - \ No newline at end of file diff --git a/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl b/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl index c3e9f419a..a36161432 100644 --- a/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl +++ b/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl @@ -78,3 +78,35 @@ name will be used as the label. --> delete + +<#-- Macros for specific properties --> + +<#-- Vitro namespace links + + Currently the page displays the vitro namespace links properties. Future versions + will use the vivo core ontology links property, eliminating the need for special handling. + + Note that this macro has a side-effect in the calls to propertyGroups.getPropertyAndRemoveFromList(). +--> +<#macro vitroLinks propertyGroups showEditLinks linkListClass="individual-urls"> + <#local vitroNs = "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"> + <#local primaryLink = propertyGroups.getPropertyAndRemoveFromList("${vitroNs}primaryLink")!> + <#local additionalLinks = propertyGroups.getPropertyAndRemoveFromList("${vitroNs}additionalLink")!> + + <#if (primaryLink?has_content || additionalLinks?has_content)> <#-- true when the property is in the list, even if not populated (when editing) --> + + +