Changeset 20023 for greenstone3


Ignore:
Timestamp:
2009-07-20T14:46:03+12:00 (15 years ago)
Author:
kjdon
Message:

added collectionHomeLinkWithLogoIfAvailable template, copied from default interface. haven't used it yet, as want to call it from style.xsl, but gslib doesn't seem to work from included stylesheet. So need to either make it work, or get rid of style in the same way been done for default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/gs2/transform/library.xsl

    r20019 r20023  
    7272  </xsl:template>
    7373
     74  <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     75  <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
     76
     77  <xsl:template name="collectionHomeLinkWithLogoIfAvailable">
     78    <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
     79      <xsl:choose>
     80    <xsl:when test="$this-element/displayItem[@name='icon']">
     81      <img border="0">
     82        <xsl:attribute name="src">
     83          <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
     84        </xsl:attribute>   
     85        <xsl:attribute name="alt">
     86          <xsl:value-of select="$this-element/displayItem[@name='name']"/>
     87        </xsl:attribute>
     88        <xsl:attribute name="title">
     89          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
     90        </xsl:attribute>
     91      </img>
     92    </xsl:when>
     93    <xsl:otherwise>
     94      <xsl:value-of select="$this-element/displayItem[@name='name']"/>
     95    </xsl:otherwise>
     96      </xsl:choose>
     97    </a>
     98  </xsl:template>
    7499
    75100  <xsl:template name="quickSearchForm">
Note: See TracChangeset for help on using the changeset viewer.