eliminate redundancy in related role property group list view

This commit is contained in:
tworrall 2011-10-21 20:54:21 +00:00
parent 832442958d
commit a9d6a2bee8

View file

@ -14,7 +14,7 @@
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the <#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement --> next statement -->
<#macro showRole statement property> <#macro showRole statement property >
<#local linkedIndividual> <#local linkedIndividual>
<#if statement.indivInRole??> <#if statement.indivInRole??>
@ -26,12 +26,16 @@
</#local> </#local>
<#-- Generally roles are assigned a label when entered through a custom form. Investigator and its subclasses do not, <#-- Generally roles are assigned a label when entered through a custom form. Investigator and its subclasses do not,
so use the type label instead. --> so use the type label instead if not collated by subclass. -->
<#local roleLabel> <#local roleLabel>
<#if statement.roleLabel?has_content>${statement.roleLabel}
<#-- Display, e.g., "Principal Investigator" for "Principal Investigator Role", <#-- Display, e.g., "Principal Investigator" for "Principal Investigator Role",
"Editor" for "Editor Role". "Editor" for "Editor Role".
This information is redundant if the property is collated, since it appears in the subclass label. --> This information is redundant if the property is collated, since it appears in the subclass label. -->
<#if statement.roleLabel?has_content>
<#if statement.roleLabel?lower_case?replace(" role", "") != subclassName?lower_case?replace(" role", "")>
${statement.roleLabel?replace(" Role", "")}
</#if>
<#elseif (! property.collatedBySubclass ) && statement.roleTypeLabel?has_content>${statement.roleTypeLabel?replace(" Role", "")} <#elseif (! property.collatedBySubclass ) && statement.roleTypeLabel?has_content>${statement.roleTypeLabel?replace(" Role", "")}
</#if> </#if>
</#local> </#local>