NIHVIVO-2309 Fix propStatement-educationalTraining.ftl to handle coming from propDelete, where individual is not defined in the data model

This commit is contained in:
ryounes 2011-03-24 21:22:26 +00:00
parent 93dcc4d082
commit f197bb8693

View file

@ -5,11 +5,12 @@
<#import "lib-sequence.ftl" as s> <#import "lib-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt> <#import "lib-datetime.ftl" as dt>
<@showEducationalTraining statement individual /> <#-- Coming from propDelete, individual is not defined, but we are editing. -->
<@showEducationalTraining statement=statement editable=(!individual?? || individual.editable) />
<#-- 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 showEducationalTraining statement individual> <#macro showEducationalTraining statement editable>
<#local degree> <#local degree>
<#if statement.degreeName??> <#if statement.degreeName??>
@ -25,7 +26,7 @@
<#local linkedIndividual> <#local linkedIndividual>
<#if statement.org??> <#if statement.org??>
<a href="${profileUrl(statement.org)}">${statement.orgName}</a> <a href="${profileUrl(statement.org)}">${statement.orgName}</a>
<#elseif individual.editable> <#elseif editable>
<#-- Show the link to the context node only if the user is editing the page. --> <#-- Show the link to the context node only if the user is editing the page. -->
<a href="${profileUrl(statement.edTraining)}">missing organization</a> <a href="${profileUrl(statement.edTraining)}">missing organization</a>
</#if> </#if>