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 bee727cd6..b3328bcac 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 @@ -448,7 +448,12 @@ public class GroupedPropertyList extends BaseTemplateModel { return null; } + @Deprecated public PropertyTemplateModel getPropertyAndRemoveFromList(String propertyUri) { + return pullProperty(propertyUri); + } + + public PropertyTemplateModel pullProperty(String propertyUri) { for (PropertyGroupTemplateModel pgtm : groups) { List properties = pgtm.getProperties(); @@ -470,6 +475,5 @@ public class GroupedPropertyList extends BaseTemplateModel { } return null; } - } 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 49be5bd0b..6f291eac8 100644 --- a/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl +++ b/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl @@ -172,11 +172,11 @@ name will be used as the label. --> 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(). + Note that this macro has a side-effect in the calls to propertyGroups.pullProperty(). --> <#macro vitroLinks propertyGroups namespaces editable linkListClass="individual-urls"> - <#local primaryLink = propertyGroups.getPropertyAndRemoveFromList("${namespaces.vitro}primaryLink")!> - <#local additionalLinks = propertyGroups.getPropertyAndRemoveFromList("${namespaces.vitro}additionalLink")!> + <#local primaryLink = propertyGroups.pullProperty("${namespaces.vitro}primaryLink")!> + <#local additionalLinks = propertyGroups.pullProperty("${namespaces.vitro}additionalLink")!> <#if (primaryLink?has_content || additionalLinks?has_content)> <#-- true when the property is in the list, even if not populated (when editing) -->