NIHVIVO-1959 Added default value for property parameter in hasStatement(). Tried to put the onus of determining whether a property is available in the function. Work in progress.

This commit is contained in:
nac26 2011-01-31 16:50:01 +00:00
parent 45e9480885
commit 7f464394d0

View file

@ -3,16 +3,16 @@
<#-- Template for sparkline visualization on individual profile page --> <#-- Template for sparkline visualization on individual profile page -->
<#-- Determine whether this person is an author --> <#-- Determine whether this person is an author -->
<#assign authorship = propertyGroups.getProperty("${core}authorInAuthorship")!> <#assign authorship = propertyGroups.getProperty("${core}authorInAuthorship")!false>
<#assign isAuthor = p.hasStatements(authorship)!false /> <#assign isAuthor = p.hasStatements(authorship)!false />
<#-- Uncomment the following line for a quick confirmation on Publications logic --> <#-- Uncomment the following line for a quick confirmation on Publications logic -->
<#-- <h1>Publications? <#if isAuthor>Ding Ding Ding!<#else>Wah Wuh!</#if></h1> --> <#-- <h1>Publications? <#if isAuthor>Ding Ding Ding!<#else>Wah Wuh!</#if></h1> -->
<#-- Determine whether this person is involved in any grants --> <#-- Determine whether this person is involved in any grants -->
<#assign investigatorRole = propertyGroups.getProperty("${core}hasInvestigatorRole")!> <#assign investigatorRole = propertyGroups.getProperty("${core}hasInvestigatorRole")!false>
<#assign piRole = propertyGroups.getProperty("${core}hasPrincipalInvestigatorRole")!> <#assign piRole = propertyGroups.getProperty("${core}hasPrincipalInvestigatorRole")!false>
<#assign coPiRole = propertyGroups.getProperty("${core}hasCo-PrincipalInvestigatorRole")!> <#assign coPiRole = propertyGroups.getProperty("${core}hasCo-PrincipalInvestigatorRole")!false>
<#if ( p.hasStatements(investigatorRole)?? || p.hasStatements(piRole)?? || p.hasStatements(coPiRole)?? )> <#if ( p.hasStatements(investigatorRole) || p.hasStatements(piRole) || p.hasStatements(coPiRole) )>
<#assign isInvestigator = true /> <#assign isInvestigator = true />
<#else> <#else>
<#assign isInvestigator = false /> <#assign isInvestigator = false />