Foundry: BugFix in for navigation display. The selected-only attribute was not handled correctly.

git-svn-id: https://svn.libreccm.org/ccm/trunk@3675 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-10-08 17:21:21 +00:00
parent ef3ba28dfe
commit 39da2f1993
1 changed files with 58 additions and 30 deletions

View File

@ -296,7 +296,9 @@
<xsl:param name="selected-only" tunnel="yes"/> <xsl:param name="selected-only" tunnel="yes"/>
<xsl:param name="current-level" select="1" tunnel="yes"/> <xsl:param name="current-level" select="1" tunnel="yes"/>
<xsl:param name="current-level-tree" <xsl:param name="current-level-tree"
select="$data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/nav:category" select="if($selected-only)
then $data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/nav:category[@isSelected='true']
else $data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/nav:category"
tunnel="yes"/> tunnel="yes"/>
<xsl:call-template name="foundry:message-debug"> <xsl:call-template name="foundry:message-debug">
@ -313,36 +315,62 @@
<xsl:choose> <xsl:choose>
<xsl:when test="($current-level &gt;= $min-level) and ($current-level &lt;= $max-level)"> <xsl:when test="($current-level &gt;= $min-level) and ($current-level &lt;= $max-level)">
<xsl:apply-templates> <xsl:apply-templates>
<xsl:with-param name="navigation-id" select="$navigation-id" tunnel="yes"/> <xsl:with-param name="navigation-id"
<xsl:with-param name="with-colorset" select="$with-colorset" tunnel="yes"/> select="$navigation-id"
<xsl:with-param name="min-level" select="$min-level" tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="max-level" select="$max-level" tunnel="yes"/> <xsl:with-param name="with-colorset"
select="$with-colorset"
tunnel="yes"/>
<xsl:with-param name="min-level"
select="$min-level"
tunnel="yes"/>
<xsl:with-param name="max-level"
select="$max-level"
tunnel="yes"/>
<xsl:with-param name="show-description-text" <xsl:with-param name="show-description-text"
select="$show-description-text" select="$show-description-text"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="current-level" select="$current-level + 1" tunnel="yes"/> <xsl:with-param name="selected-only"
select="$selected-only"
tunnel="yes"/>
<xsl:with-param name="current-level"
select="$current-level + 1"
tunnel="yes"/>
<xsl:with-param name="current-level-tree" <xsl:with-param name="current-level-tree"
select="$current-level-tree" select="$current-level-tree"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="navigation-links-tree" select="." tunnel="yes"/> <xsl:with-param name="navigation-links-tree"
select="."
tunnel="yes"/>
</xsl:apply-templates> </xsl:apply-templates>
</xsl:when> </xsl:when>
<xsl:when test="($current-level &lt; $min-level) and $current-level-tree/nav:category"> <xsl:when test="($current-level &lt; $min-level) and $current-level-tree/nav:category">
<xsl:apply-templates select="."> <xsl:apply-templates select=".">
<xsl:with-param name="navigation-id" select="$navigation-id" tunnel="yes"/> <xsl:with-param name="navigation-id"
<xsl:with-param name="with-colorset" select="$with-colorset" tunnel="yes"/> select="$navigation-id"
<xsl:with-param name="min-level" select="$min-level" tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="max-level" select="$max-level"/> <xsl:with-param name="with-colorset"
select="$with-colorset"
tunnel="yes"/>
<xsl:with-param name="min-level"
select="$min-level"
tunnel="yes"/>
<xsl:with-param name="max-level"
select="$max-level"/>
<xsl:with-param name="show-description-text" <xsl:with-param name="show-description-text"
select="$show-description-text" select="$show-description-text"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="current-level" select="$current-level + 1" <xsl:with-param name="selected-only"
tunnel="yes"/> select="$selected-only"
tunnel="yes"/>
<xsl:with-param name="current-level"
select="$current-level + 1"
tunnel="yes"/>
<xsl:with-param name="current-level-tree" <xsl:with-param name="current-level-tree"
select="$current-level-tree/nav:category" select="$current-level-tree/nav:category"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="navigation-links-tree" select="." <xsl:with-param name="navigation-links-tree" select="."
tunnel="yes"/> tunnel="yes"/>
</xsl:apply-templates> </xsl:apply-templates>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
@ -370,15 +398,15 @@
<xsl:with-param name="min-level" select="$min-level" tunnel="yes"/> <xsl:with-param name="min-level" select="$min-level" tunnel="yes"/>
<xsl:with-param name="max-level" select="$max-level" tunnel="yes"/> <xsl:with-param name="max-level" select="$max-level" tunnel="yes"/>
<xsl:with-param name="show-description-text" <xsl:with-param name="show-description-text"
select="show-description-text" select="show-description-text"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="current-level" select="$current-level" tunnel="yes"/> <xsl:with-param name="current-level" select="$current-level" tunnel="yes"/>
<xsl:with-param name="current-level-tree" <xsl:with-param name="current-level-tree"
select="current()" select="current()"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="navigation-links-tree" <xsl:with-param name="navigation-links-tree"
select="$navigation-links-tree" select="$navigation-links-tree"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="href" select="./@url" tunnel="yes"/> <xsl:with-param name="href" select="./@url" tunnel="yes"/>
<xsl:with-param name="title" tunnel="yes"> <xsl:with-param name="title" tunnel="yes">
<xsl:choose> <xsl:choose>
@ -410,15 +438,15 @@
<xsl:with-param name="min-level" select="$min-level" tunnel="yes"/> <xsl:with-param name="min-level" select="$min-level" tunnel="yes"/>
<xsl:with-param name="max-level" select="$max-level" tunnel="yes"/> <xsl:with-param name="max-level" select="$max-level" tunnel="yes"/>
<xsl:with-param name="show-description-text" <xsl:with-param name="show-description-text"
select="show-description-text" select="show-description-text"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="current-level" select="$current-level" tunnel="yes"/> <xsl:with-param name="current-level" select="$current-level" tunnel="yes"/>
<xsl:with-param name="current-level-tree" <xsl:with-param name="current-level-tree"
select="current()" select="current()"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="navigation-links-tree" <xsl:with-param name="navigation-links-tree"
select="$navigation-links-tree" select="$navigation-links-tree"
tunnel="yes"/> tunnel="yes"/>
<xsl:with-param name="href" select="./@url" tunnel="yes"/> <xsl:with-param name="href" select="./@url" tunnel="yes"/>
<xsl:with-param name="title" tunnel="yes"> <xsl:with-param name="title" tunnel="yes">
<xsl:choose> <xsl:choose>