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:
rjy7 2011-03-15 18:00:03 +00:00
parent 35a48005b9
commit f3ce105d94
2 changed files with 5 additions and 4 deletions

View file

@ -125,7 +125,7 @@ public class IndividualController extends FreemarkerHttpServlet {
body.put("relatedSubject", getRelatedSubject(vreq));
body.put("namespaces", namespaces);
body.put("temporalVisualizationEnabled", getTemporalVisualizationFlag());
body.put("verbosePropertyForm", getVerbosePropertyValues(vreq));
body.put("verbosePropertyForm", getVerbosePropertyFormValues(vreq));
IndividualTemplateModel itm = getIndividualTemplateModel(vreq, individual);
/* 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);
}
private Map<String, Object> getVerbosePropertyValues(VitroRequest vreq) {
private Map<String, Object> getVerbosePropertyFormValues(VitroRequest vreq) {
Map<String, Object> map = null;

View file

@ -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. -->
<#macro addLinkWithLabel property editable label="${property.name?capitalize}" extraParams="">
<#local addLink><@addLink property editable label extraParams /></#local>
<#if addLink?has_content>
<h2 id="${property.localName}">${label} ${addLink} <@verboseDisplay property /></h2>
<#local verboseDisplay><@verboseDisplay property /></#local>
<#if addLink?has_content || verboseDisplay?has_content>
<h2 id="${property.localName}">${label} ${addLink!} ${verboseDisplay!}</h2>
</#if>
</#macro>