Ignore:
Timestamp:
2009-01-06T14:52:16+13:00 (15 years ago)
Author:
kjdon
Message:

made the indentation nice

File:
1 edited

Legend:

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

    r18314 r18318  
    1414  <xsl:template name="globalStyle">
    1515    <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"/>
     16    <link rel="stylesheet" href="interfaces/gs2/style/classic2.css" type="text/css"/>
    1717  </xsl:template>
    1818 
     
    4242    <xsl:param name="clTop"/>
    4343    <xsl:variable name="this-element" select="/page/pageResponse/collection"/>
    44      <div id="bannar">
     44    <div id="bannar">
    4545      <div class="pageinfo">
    46           <xsl:call-template name="top-buttons">
    47         <xsl:with-param name="collName" select="$collName"/>
    48         <xsl:with-param name="pageType" select="$pageType"/>
    49       </xsl:call-template>
    50           <xsl:if test="not(/page/pageRequest/@action='d')">
    51     <xsl:variable name="text">
     46    <xsl:call-template name="top-buttons">
     47      <xsl:with-param name="collName" select="$collName"/>
     48      <xsl:with-param name="pageType" select="$pageType"/>
     49    </xsl:call-template>
     50    <xsl:if test="not(/page/pageRequest/@action='d')">
     51      <xsl:variable name="text">
     52        <xsl:choose>
     53          <xsl:when test="$pageType='browse'">
     54        <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier[@name=$clTop]/displayItem[@name='name']"/>
     55          </xsl:when>
     56          <xsl:otherwise>
     57        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, concat($pageType, '_t'))"/>
     58          </xsl:otherwise>
     59        </xsl:choose>
     60      </xsl:variable>
     61      <xsl:if test="$text != '__t_'">
     62        <p class="bannertitle"><xsl:value-of select="$text"/></p>
     63      </xsl:if>
     64    </xsl:if>
     65      </div>
     66
     67      <div class="collectimage">
     68    <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
    5269      <xsl:choose>
    53         <xsl:when test="$pageType='browse'">
    54           <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier[@name=$clTop]/displayItem[@name='name']"/>
     70        <xsl:when test="$this-element/displayItem[@name='icon']">
     71          <img border="0">
     72        <xsl:attribute name="src">
     73          <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
     74        </xsl:attribute>   
     75        <xsl:attribute name="alt">
     76          <xsl:value-of select="$this-element/displayItem[@name='name']"/>
     77        </xsl:attribute>
     78        <xsl:attribute name="title">
     79          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
     80        </xsl:attribute>
     81          </img>
    5582        </xsl:when>
    5683        <xsl:otherwise>
    57           <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, concat($pageType, '_t'))"/>
     84          <b><xsl:value-of select="$this-element/displayItem[@name='name']"/></b>
    5885        </xsl:otherwise>
    5986      </xsl:choose>
    60     </xsl:variable>
    61             <xsl:if test="$text != '__t_'">
    62         <p class="bannertitle"><xsl:value-of select="$text"/></p>
    63             </xsl:if>
    64       </xsl:if>
    65      </div>
    66 
    67      <div class="collectimage">
    68        <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
    69         <xsl:choose>
    70           <xsl:when test="$this-element/displayItem[@name='icon']">
    71         <img border="0">
    72           <xsl:attribute name="src">
    73             <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
    74           </xsl:attribute> 
    75           <xsl:attribute name="alt">
    76             <xsl:value-of select="$this-element/displayItem[@name='name']"/>
    77           </xsl:attribute>
    78           <xsl:attribute name="title">
    79             <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
    80           </xsl:attribute>
    81         </img>
    82           </xsl:when>
    83           <xsl:otherwise>
    84         <b><xsl:value-of select="$this-element/displayItem[@name='name']"/></b>
    85           </xsl:otherwise>
    86         </xsl:choose>
    87       </a>
    88        </div>
     87    </a>
    8988      </div>
     89    </div>
    9090    <div class="bannerextra"></div>
    9191  </xsl:template>
     
    9595    <xsl:param name="pageType"/>
    9696    <p class="bannerlinks">
    97           <a class="navlink" href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
    98         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
    99       </a>
    100     <!-- <xsl:choose>
    101     <xsl:when test="$pageType='help'">
    102              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    103         </xsl:when>
     97      <a class="navlink" href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
     98    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
     99      </a>
     100      <!--<xsl:choose>
     101        <xsl:when test="$pageType='help'">
     102      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
     103    </xsl:when>
    104104    <xsl:otherwise>
    105105      <a class="navlink" href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
    106     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    107           </a>
    108        </xsl:otherwise>
     106        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
     107      </a>
     108    </xsl:otherwise>
    109109      </xsl:choose> -->
    110        <xsl:choose>
    111       <xsl:when test="$pageType='pref'">
    112           <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    113        </xsl:when>
    114       <xsl:otherwise>
    115         <a class="navlink" href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
    116         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    117         </a>
    118        </xsl:otherwise>
    119     </xsl:choose>     
     110      <xsl:choose>
     111    <xsl:when test="$pageType='pref'">
     112      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
     113    </xsl:when>
     114    <xsl:otherwise>
     115      <a class="navlink" href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
     116        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
     117      </a>
     118    </xsl:otherwise>
     119      </xsl:choose>     
    120120    </p>
    121121  </xsl:template>
     
    133133
    134134    <div class="navbar">
    135        <p class="navbar">
    136      <xsl:choose>
    137      <xsl:when test="not($dir='rtl')">
    138      <xsl:if test="$this-element/serviceList/service[@type='query']">
    139        <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    140      </xsl:if>
    141      </xsl:when>
    142      <xsl:otherwise>
    143       <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
    144       <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    145       </xsl:if>
    146      </xsl:otherwise>
     135      <p class="navbar">
     136    <xsl:choose>
     137      <xsl:when test="not($dir='rtl')">
     138        <xsl:if test="$this-element/serviceList/service[@type='query']">
     139          <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
     140        </xsl:if>
     141      </xsl:when>
     142      <xsl:otherwise>
     143        <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
     144          <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
     145        </xsl:if>
     146      </xsl:otherwise>
    147147    </xsl:choose>
    148148
     
    154154      </xsl:apply-templates>
    155155    </xsl:for-each>
    156        
     156   
    157157    <xsl:choose>   
    158     <xsl:when test="$dir='rtl'">
    159     <xsl:if test="$this-element/serviceList/service[@type='query']">
    160        <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    161     </xsl:if>
    162     </xsl:when>
    163     <xsl:otherwise>
    164     <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
    165       <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    166     </xsl:if>
    167     </xsl:otherwise>
     158      <xsl:when test="$dir='rtl'">
     159        <xsl:if test="$this-element/serviceList/service[@type='query']">
     160          <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
     161        </xsl:if>
     162      </xsl:when>
     163      <xsl:otherwise>
     164        <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
     165          <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
     166        </xsl:if>
     167      </xsl:otherwise>
    168168    </xsl:choose>
    169        </p>
    170       </div>
     169      </p>
     170    </div>
    171171  </xsl:template>
    172172
     
    175175    <xsl:choose>
    176176      <xsl:when test="/page/pageRequest/@action='q'">     
    177        <span class="narspace">search</span>
     177    <span class="narspace">search</span>
    178178      </xsl:when>
    179179      <xsl:otherwise>
     
    195195    <xsl:choose>
    196196      <xsl:when test="/page/pageRequest/paramList/param[@name='s']/@value='PhindApplet'">
    197         <span class="narspace">phrases</span>
    198       </xsl:when>
    199       <xsl:otherwise>
    200      <a class="navlink" href="{$library_name}?a=a&amp;rt=d&amp;s=PhindApplet&amp;c={$collName}"><xsl:if test="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"/></xsl:attribute></xsl:if>phrases</a>
     197    <span class="narspace">phrases</span>
     198      </xsl:when>
     199      <xsl:otherwise>
     200    <a class="navlink" href="{$library_name}?a=a&amp;rt=d&amp;s=PhindApplet&amp;c={$collName}"><xsl:if test="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"/></xsl:attribute></xsl:if>phrases</a>
    201201      </xsl:otherwise>
    202202    </xsl:choose>
     
    208208    <xsl:choose>
    209209      <xsl:when test="/page/pageRequest/@action='b' and $clTop=@name">
    210      <span class="narspace"><xsl:value-of select="displayItem[@name='name']"/></span>
     210    <span class="narspace"><xsl:value-of select="displayItem[@name='name']"/></span>
    211211      </xsl:when>
    212212      <xsl:otherwise>
     
    218218  <xsl:template name="dividerBar">   
    219219    <xsl:param name='text'/>
    220       <xsl:choose>
     220    <xsl:choose>
    221221      <xsl:when test="$text">
    222      <div class="divbar"><p class="navbar"><xsl:value-of select="$text"/></p></div>
    223       </xsl:when>
    224       <xsl:otherwise>
    225      <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
     222    <div class="divbar"><p class="navbar"><xsl:value-of select="$text"/></p></div>
     223      </xsl:when>
     224      <xsl:otherwise>
     225    <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
    226226      </xsl:otherwise>
    227227    </xsl:choose>
     
    229229 
    230230  <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 --> 
     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 --> 
    233233  </xsl:template>
    234234
     
    343343      alt='{$alt}' title='{$title}'/>
    344344  </xsl:template>
    345    
     345 
    346346  <xsl:template name="icondoc">
    347347    <xsl:param name="alt">Word</xsl:param>
Note: See TracChangeset for help on using the changeset viewer.