Foundry: Some improvments for images

git-svn-id: https://svn.libreccm.org/ccm/trunk@3439 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-05-29 13:05:16 +00:00
parent 9a9980335b
commit 62bb632004
2 changed files with 20 additions and 0 deletions

View File

@ -93,6 +93,9 @@
<xsl:with-param name="src" <xsl:with-param name="src"
tunnel="yes" tunnel="yes"
select="concat('/cms-service/stream/image/?image_id=', ./image/id)"/> select="concat('/cms-service/stream/image/?image_id=', ./image/id)"/>
<xsl:with-param name="href"
tunnel="yes"
select="foundry:parse-link(concat('/cms-service/stream/image/?image_id=', ./image/id))"/>
<xsl:with-param name="img-width" <xsl:with-param name="img-width"
tunnel="yes" tunnel="yes"
select="./image/width"/> select="./image/width"/>
@ -110,6 +113,17 @@
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:with-param> </xsl:with-param>
<xsl:with-param name="title"
tunnel="yes">
<xsl:choose>
<xsl:when test="string-length(./caption) &gt; 0">
<xsl:value-of select="./caption"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./image/displayName"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="sort-key" tunnel="yes" select="./sortKey"/> <xsl:with-param name="sort-key" tunnel="yes" select="./sortKey"/>
<xsl:with-param name="position" tunnel="yes" select="position()"/> <xsl:with-param name="position" tunnel="yes" select="position()"/>
</xsl:apply-templates> </xsl:apply-templates>

View File

@ -1317,6 +1317,7 @@
<xsl:param name="img-height" tunnel="yes" as="xs:integer" select="(-1)"/> <xsl:param name="img-height" tunnel="yes" as="xs:integer" select="(-1)"/>
<!-- Content of the alt attribute if provided by surrounding tag --> <!-- Content of the alt attribute if provided by surrounding tag -->
<xsl:param name="alt" tunnel="yes" as="xs:string" select="''"/> <xsl:param name="alt" tunnel="yes" as="xs:string" select="''"/>
<xsl:param name="title" tunnel="yes" as="xs:string" select="''"/>
<xsl:variable name="src-raw"> <xsl:variable name="src-raw">
<xsl:choose> <xsl:choose>
@ -1433,6 +1434,11 @@
<xsl:value-of select="foundry:get-static-text('', ./@alt, false())"/> <xsl:value-of select="foundry:get-static-text('', ./@alt, false())"/>
</xsl:attribute> </xsl:attribute>
</xsl:if> </xsl:if>
<xsl:if test="$title != ''">
<xsl:attribute name="title">
<xsl:value-of select="$title"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="./@title"> <xsl:if test="./@title">
<xsl:attribute name="title"> <xsl:attribute name="title">
<xsl:value-of select="foundry:get-static-text('', ./@title, false())"/> <xsl:value-of select="foundry:get-static-text('', ./@title, false())"/>