Changeset 13581


Ignore:
Timestamp:
2007-01-12T11:40:35+13:00 (17 years ago)
Author:
shaoqun
Message:

added the code to whether the collection image exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/web/interfaces/default/transform/home.xsl

    r13505 r13581  
    3232      <li>
    3333      <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
    34          
    35        <img>
    36         <xsl:attribute name="src">
    37           <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
    38         </xsl:attribute>
    39         <xsl:attribute name="alt">
    40           <xsl:value-of select="displayItem[@name='name']"/>
    41         </xsl:attribute>
    42       </img>
    43           </a>
     34           <xsl:choose>
     35              <xsl:when test="displayItem[@name='icon']">
     36                <img>
     37               <xsl:attribute name="src">
     38                 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
     39               </xsl:attribute>
     40               <xsl:attribute name="alt">
     41                    <xsl:value-of select="displayItem[@name='name']"/>
     42               </xsl:attribute>
     43             </img>
     44          </xsl:when>
     45              <xsl:otherwise>
     46                   <xsl:value-of select="displayItem[@name='name']"/>
     47              </xsl:otherwise>
     48           </xsl:choose>         
     49      </a>
    4450       </li>
    4551    </xsl:for-each>
Note: See TracChangeset for help on using the changeset viewer.