Adding hide-empty-list attribute to object list template tag. Default is true

git-svn-id: https://svn.libreccm.org/ccm/trunk@5736 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2018-11-18 11:11:37 +00:00
parent 471ebd7672
commit c46ad3e647
1 changed files with 27 additions and 6 deletions

View File

@ -77,11 +77,32 @@
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<xsl:apply-templates> <xsl:variable name="hide-empty-list">
<xsl:with-param name="object-list-datatree" <xsl:choose>
tunnel="yes" <xsl:when test="./@hide-empty-list">
select="$object-list-datatree"/> <xsl:value-of select="foundry:boolean(./@hide-empty-list)" />
</xsl:apply-templates> </xsl:when>
<xsl:otherwise>
<xsl:value-of select="foundry:boolean(foundry:get-setting('global', 'hide-empty-list', 'true'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--<pre>
<xsl:value-of select="./@hide-empty-list" />
<xsl:value-of select="$hide-empty-list" />
<xsl:value-of select="$hide-empty-list = false()" />
<xsl:value-of select="./nav:noContent and $hide-empty-list = false()" />
</pre>-->
<xsl:if test="not(./nav:noContent) or (./nav:content and $hide-empty-list = false())">
<!--<pre>showing list</pre>-->
<xsl:apply-templates>
<xsl:with-param name="object-list-datatree"
tunnel="yes"
select="$object-list-datatree"/>
</xsl:apply-templates>
</xsl:if>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>