Ignore:
Timestamp:
08/23/12 14:26:55 (9 years ago)
Author:
ak19
Message:

A custom icon can be selected from collection or site level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/config_format.xsl

    r26121 r26127  
    131131            </xsl:when>
    132132            <xsl:when test="@file">
    133                 <img>
    134                 <xslt:attribute name='src'>
    135                     <xslt:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name = 'httpPath']"/>
    136                     <xsl:text>/images/</xsl:text>
    137                     <xsl:value-of disable-output-escaping="yes" select="@file"/>
    138                 </xslt:attribute>
    139                 </img>
     133              <img>
     134                <xslt:attribute name='src'>
     135                  <xsl:choose>
     136                <xsl:when test="not(@select) or @select='site'">
     137                  <xsl:value-of disable-output-escaping="yes" select="concat('interfaces/',$interface_name,'/images/',@file)"/>
     138                </xsl:when>
     139                <xsl:when test="@select='collection'">
     140                  <xslt:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
     141                  <xsl:value-of disable-output-escaping="yes" select="concat('/images/',@file)"/>
     142                </xsl:when>
     143                  </xsl:choose>             
     144                </xslt:attribute>
     145              </img>
    140146            </xsl:when>
    141147            <xsl:when test="not(@type) or @type='document'">
Note: See TracChangeset for help on using the changeset viewer.