Several small bugfixes for Foundry
git-svn-id: https://svn.libreccm.org/ccm/trunk@2983 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c716edd40b
commit
de953d2238
|
|
@ -146,7 +146,14 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="./@href-static">
|
<xsl:if test="./@href-static">
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="./@href-static"/>
|
<xsl:choose>
|
||||||
|
<xsl:when test="starts-with(./@href-static, '/')">
|
||||||
|
<xsl:value-of select="concat($context-prefix, ./@href-static)"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="./@href-static"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="$href != ''">
|
<xsl:if test="$href != ''">
|
||||||
|
|
@ -1321,7 +1328,7 @@
|
||||||
select="foundry:get-attribute-value(current(), 'width', -1)"/>
|
select="foundry:get-attribute-value(current(), 'width', -1)"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Value of the height attriibute of the img element in the layout template if set.
|
Value of the height attribute of the img element in the layout template if set.
|
||||||
If there is no attribute the value is set to -1.
|
If there is no attribute the value is set to -1.
|
||||||
-->
|
-->
|
||||||
<xsl:variable name="max-height"
|
<xsl:variable name="max-height"
|
||||||
|
|
@ -1349,6 +1356,9 @@
|
||||||
<xsl:when test="$max-height > 0 and $img-height > $max-height" >
|
<xsl:when test="$max-height > 0 and $img-height > $max-height" >
|
||||||
<xsl:value-of select="round($max-height div $img-height * $img-width)"/>
|
<xsl:value-of select="round($max-height div $img-height * $img-width)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="$img-width <= 0">
|
||||||
|
<xsl:value-of select="$max-width"/>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$img-width"/>
|
<xsl:value-of select="$img-width"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
|
@ -1376,6 +1386,9 @@
|
||||||
<xsl:when test="$max-width > 0 and $img-width > $max-width">
|
<xsl:when test="$max-width > 0 and $img-width > $max-width">
|
||||||
<xsl:value-of select="round($max-width div $img-width * $img-height)"/>
|
<xsl:value-of select="round($max-width div $img-width * $img-height)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="$img-height <= 0">
|
||||||
|
<xsl:value-of select="$max-height"/>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$img-height"/>
|
<xsl:value-of select="$img-height"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,10 @@
|
||||||
|
|
||||||
<xsl:for-each select="document(foundry:gen-path('conf/global.xml'))/foundry:configuration/supported-languages/language">
|
<xsl:for-each select="document(foundry:gen-path('conf/global.xml'))/foundry:configuration/supported-languages/language">
|
||||||
<xsl:apply-templates select="$language-layout-tree">
|
<xsl:apply-templates select="$language-layout-tree">
|
||||||
<xsl:with-param name="id" select="concat('language-selector-', ./@locale)"/>
|
<xsl:with-param name="class"
|
||||||
|
select="if (./@locale = $lang)
|
||||||
|
then concat('language-selector-', ./@locale, ' selected')
|
||||||
|
else concat('language-selector-', ./@locale)"/>
|
||||||
<xsl:with-param name="href" tunnel="yes" select="concat('?lang=', ./@locale)"/>
|
<xsl:with-param name="href" tunnel="yes" select="concat('?lang=', ./@locale)"/>
|
||||||
<xsl:with-param name="language-name"
|
<xsl:with-param name="language-name"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
|
|
|
||||||
|
|
@ -940,8 +940,12 @@
|
||||||
<!-- Special rule: Use content item title for root-page in navigation -->
|
<!-- Special rule: Use content item title for root-page in navigation -->
|
||||||
<xsl:when test="position() = last() and position() = 1">
|
<xsl:when test="position() = last() and position() = 1">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="/bebop:page//title">
|
<xsl:when test="$data-tree//title">
|
||||||
<xsl:sequence select="foundry:shying(/bebop:page//title)"/>
|
<xsl:variable name="page-title">
|
||||||
|
<xsl:value-of select="$data-tree/*/cms:item/title[1]"/>
|
||||||
|
</xsl:variable>
|
||||||
|
<!--<xsl:sequence select="foundry:shying($data-tree//title[1])"/>-->
|
||||||
|
<xsl:sequence select="foundry:shying($page-title)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:sequence select="''"/>
|
<xsl:sequence select="''"/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue