Several small bugfixes for Foundry

git-svn-id: https://svn.libreccm.org/ccm/trunk@2983 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-11-21 17:04:01 +00:00
parent c716edd40b
commit de953d2238
3 changed files with 25 additions and 5 deletions

View File

@ -146,7 +146,14 @@
</xsl:if>
<xsl:if test="./@href-static">
<xsl:attribute name="href">
<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:if>
<xsl:if test="$href != ''">
@ -1321,7 +1328,7 @@
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.
-->
<xsl:variable name="max-height"
@ -1349,6 +1356,9 @@
<xsl:when test="$max-height &gt; 0 and $img-height &gt; $max-height" >
<xsl:value-of select="round($max-height div $img-height * $img-width)"/>
</xsl:when>
<xsl:when test="$img-width &lt;= 0">
<xsl:value-of select="$max-width"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$img-width"/>
</xsl:otherwise>
@ -1376,6 +1386,9 @@
<xsl:when test="$max-width &gt; 0 and $img-width &gt; $max-width">
<xsl:value-of select="round($max-width div $img-width * $img-height)"/>
</xsl:when>
<xsl:when test="$img-height &lt;= 0">
<xsl:value-of select="$max-height"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$img-height"/>
</xsl:otherwise>

View File

@ -41,7 +41,10 @@
<xsl:for-each select="document(foundry:gen-path('conf/global.xml'))/foundry:configuration/supported-languages/language">
<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="language-name"
tunnel="yes"

View File

@ -940,8 +940,12 @@
<!-- Special rule: Use content item title for root-page in navigation -->
<xsl:when test="position() = last() and position() = 1">
<xsl:choose>
<xsl:when test="/bebop:page//title">
<xsl:sequence select="foundry:shying(/bebop:page//title)"/>
<xsl:when test="$data-tree//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:otherwise>
<xsl:sequence select="''"/>