Rename getPropertyAndRemoveFromList() to pullProperty(). The original method remains in the code but marked deprecated.
This commit is contained in:
parent
5021069574
commit
54de8d5f5b
2 changed files with 10 additions and 6 deletions
|
@ -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<PropertyTemplateModel> properties = pgtm.getProperties();
|
||||
|
@ -470,6 +475,5 @@ public class GroupedPropertyList extends BaseTemplateModel {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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) -->
|
||||
<nav role="navigation">
|
||||
|
@ -205,10 +205,10 @@ name will be used as the label. -->
|
|||
|
||||
Values for showPlaceholder: "always", "never", "with_add_link"
|
||||
|
||||
Note that this macro has a side-effect in the call to propertyGroups.getPropertyAndRemoveFromList().
|
||||
Note that this macro has a side-effect in the call to propertyGroups.pullProperty().
|
||||
-->
|
||||
<#macro image individual propertyGroups namespaces editable showPlaceholder="never" placeholder="">
|
||||
<#local mainImage = propertyGroups.getPropertyAndRemoveFromList("${namespaces.vitroPublic}mainImage")!>
|
||||
<#local mainImage = propertyGroups.pullProperty("${namespaces.vitroPublic}mainImage")!>
|
||||
<#local extraParams = "">
|
||||
<#if placeholder?has_content>
|
||||
<#local extraParams = { "placeholder" : placeholder } >
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue