Changeset 18391


Ignore:
Timestamp:
01/15/09 15:00:22 (12 years ago)
Author:
kjdon
Message:

icon templates moved to icons.xsl, in default interface. classic stylesheet names changed

File:
1 edited

Legend:

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

    r18318 r18391  
    77  exclude-result-prefixes="java util">
    88 
     9  <xsl:include href="icons.xsl"/>
     10
    911  <!-- some global parameters - these are set by whoever is invoking the transformation -->
    1012  <xsl:param name="interface_name"/>
     
    1315  <!-- any global style stuff should go in here -->
    1416  <xsl:template name="globalStyle">
    15     <link rel="stylesheet" href="interfaces/gs2/style/classic.css" type="text/css"/>
    16     <link rel="stylesheet" href="interfaces/gs2/style/classic2.css" type="text/css"/>
     17    <link rel="stylesheet" href="interfaces/gs2/style/gs2-style.css" type="text/css"/>
     18    <link rel="stylesheet" href="interfaces/gs2/style/gs2-style2.css" type="text/css"/>
    1719  </xsl:template>
    1820 
     
    228230  </xsl:template>
    229231 
    230   <xsl:template name="nzdlPageBanner">
    231     <div><img src="interfaces/nzdl/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/></xsl:attribute></img></div>
    232     <!-- end of page banner --> 
    233   </xsl:template>
    234 
    235232  <xsl:template name="greenstoneFooter">
    236233    <div class="divbar"><p class="navbar">powered by greenstone3</p>
    237234    </div>
    238   </xsl:template>
    239  
    240   <xsl:template name="imagegreenstone">
    241     <img src="interfaces/nzdl/images/gsdl.gif" width="140" height="77" border="0" hspace='0'><xsl:attribute name='alt'><xsl:call-template name='textimagegreenstone'/></xsl:attribute></img>
    242   </xsl:template>
    243  
    244   <!-- Display the appropriate image, depending on the node type -->
    245   <xsl:template match="documentNode" mode="displayNodeIcon">
    246    
    247     <!-- Root node: book icon (open or closed) -->
    248     <xsl:choose>
    249       <xsl:when test="@nodeType='root'">
    250     <xsl:choose>
    251       <xsl:when test="documentNode">
    252         <xsl:call-template name="openbookimg">
    253           <xsl:with-param name="title">Close this book</xsl:with-param>
    254         </xsl:call-template>
    255       </xsl:when>
    256       <xsl:otherwise>
    257         <xsl:call-template name="closedbookimg">
    258           <xsl:with-param name="title">Open this document and view contents</xsl:with-param>
    259         </xsl:call-template>
    260       </xsl:otherwise>
    261     </xsl:choose>
    262       </xsl:when>
    263      
    264       <!-- Internal node: folder icon (open or closed) -->
    265       <xsl:when test="@nodeType='internal'">
    266     <xsl:choose>
    267       <xsl:when test="documentNode">
    268         <xsl:call-template name="openfolderimg">
    269           <xsl:with-param name="title">Close this folder</xsl:with-param>
    270         </xsl:call-template>
    271       </xsl:when>
    272       <xsl:otherwise>
    273         <xsl:call-template name="closedfolderimg">
    274           <xsl:with-param name="title">Open this folder and view contents</xsl:with-param>
    275         </xsl:call-template>
    276       </xsl:otherwise>
    277     </xsl:choose>
    278       </xsl:when>
    279      
    280       <!-- Leaf node: page icon, and this is the default -->
    281       <xsl:otherwise>
    282     <xsl:call-template name="textpageimg">
    283       <xsl:with-param name="title">View the document</xsl:with-param>
    284     </xsl:call-template>
    285       </xsl:otherwise>
    286     </xsl:choose>
    287   </xsl:template>
    288 
    289 
    290   <xsl:template name="openbookimg">
    291     <xsl:param name="alt"/>
    292     <xsl:param name="title"/>
    293     <img border="0" width="28" height="23"
    294       src="interfaces/default/images/openbook.gif"
    295       alt="{$alt}" title="{$title}"/>
    296   </xsl:template>
    297 
    298   <xsl:template name="closedbookimg">
    299     <xsl:param name="alt"/>
    300     <xsl:param name="title"/>
    301     <img border="0" width="18" height="11" 
    302       src="interfaces/default/images/book.gif"
    303       alt="{$alt}" title="{$title}"/>
    304   </xsl:template>
    305 
    306   <xsl:template name="openfolderimg">
    307     <xsl:param name="alt"/>
    308     <xsl:param name="title"/>
    309     <img border="0" width="23" height="15" 
    310       src="interfaces/default/images/openfldr.gif"
    311       alt="{$alt}" title="{$title}"/>
    312   </xsl:template>
    313 
    314   <xsl:template name="closedfolderimg">
    315     <xsl:param name="alt"/>
    316     <xsl:param name="title"/>
    317     <img border="0" width="23" height="15"
    318       src="interfaces/default/images/clsdfldr.gif"
    319       alt="{$alt}" title="{$title}"/>
    320   </xsl:template>
    321 
    322   <xsl:template name="textpageimg">
    323     <xsl:param name="alt"/>
    324     <xsl:param name="title"/>
    325     <img border="0" width="16" height="21"
    326       src="interfaces/default/images/itext.gif"
    327       alt="{$alt}" title="{$title}"/>
    328   </xsl:template>
    329 
    330   <xsl:template name="bookshelfimg">
    331     <xsl:param name="alt"/>
    332     <xsl:param name="title"/>
    333     <img border="0" width="20" height="16"
    334       src="interfaces/default/images/bshelf.gif" 
    335       alt="{$alt}" title="{$title}"/>
    336   </xsl:template>
    337 
    338   <xsl:template name="iconpdf">
    339     <xsl:param name="alt">PDF</xsl:param>
    340     <xsl:param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'texticonpdf')"/></xsl:param>
    341     <img border="0" width='26' height='26'
    342       src='interfaces/default/images/ipdf.gif'
    343       alt='{$alt}' title='{$title}'/>
    344   </xsl:template>
    345  
    346   <xsl:template name="icondoc">
    347     <xsl:param name="alt">Word</xsl:param>
    348     <xsl:param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'texticonmsword')"/></xsl:param>
    349     <img border="0" width='26' height='26'
    350       src='interfaces/default/images/imsword.gif'
    351       alt='{$alt}' title='{$title}'/>
    352   </xsl:template>
     235  </xsl:template> 
    353236
    354237  <xsl:template name="direction">
Note: See TracChangeset for help on using the changeset viewer.