NIHVIVO-2264 Display property label with add link OR verbose property display, for properties that don't normally display a label (e.g., core:overview)
This commit is contained in:
parent
35a48005b9
commit
f3ce105d94
2 changed files with 5 additions and 4 deletions
|
@ -125,7 +125,7 @@ public class IndividualController extends FreemarkerHttpServlet {
|
||||||
body.put("relatedSubject", getRelatedSubject(vreq));
|
body.put("relatedSubject", getRelatedSubject(vreq));
|
||||||
body.put("namespaces", namespaces);
|
body.put("namespaces", namespaces);
|
||||||
body.put("temporalVisualizationEnabled", getTemporalVisualizationFlag());
|
body.put("temporalVisualizationEnabled", getTemporalVisualizationFlag());
|
||||||
body.put("verbosePropertyForm", getVerbosePropertyValues(vreq));
|
body.put("verbosePropertyForm", getVerbosePropertyFormValues(vreq));
|
||||||
|
|
||||||
IndividualTemplateModel itm = getIndividualTemplateModel(vreq, individual);
|
IndividualTemplateModel itm = getIndividualTemplateModel(vreq, individual);
|
||||||
/* We need to expose non-getters in displaying the individual's property list,
|
/* We need to expose non-getters in displaying the individual's property list,
|
||||||
|
@ -154,7 +154,7 @@ public class IndividualController extends FreemarkerHttpServlet {
|
||||||
EditSubmission.clearAllEditSubmissionsInSession(session);
|
EditSubmission.clearAllEditSubmissionsInSession(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, Object> getVerbosePropertyValues(VitroRequest vreq) {
|
private Map<String, Object> getVerbosePropertyFormValues(VitroRequest vreq) {
|
||||||
|
|
||||||
Map<String, Object> map = null;
|
Map<String, Object> map = null;
|
||||||
|
|
||||||
|
|
|
@ -82,8 +82,9 @@ we need to also show the property label. If no label is specified, the property
|
||||||
name will be used as the label. -->
|
name will be used as the label. -->
|
||||||
<#macro addLinkWithLabel property editable label="${property.name?capitalize}" extraParams="">
|
<#macro addLinkWithLabel property editable label="${property.name?capitalize}" extraParams="">
|
||||||
<#local addLink><@addLink property editable label extraParams /></#local>
|
<#local addLink><@addLink property editable label extraParams /></#local>
|
||||||
<#if addLink?has_content>
|
<#local verboseDisplay><@verboseDisplay property /></#local>
|
||||||
<h2 id="${property.localName}">${label} ${addLink} <@verboseDisplay property /></h2>
|
<#if addLink?has_content || verboseDisplay?has_content>
|
||||||
|
<h2 id="${property.localName}">${label} ${addLink!} ${verboseDisplay!}</h2>
|
||||||
</#if>
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue