Changeset 5132


Ignore:
Timestamp:
2003-08-13T12:23:09+12:00 (21 years ago)
Author:
kjdon
Message:

changed the style a bit. now have variable names for some of the colours - should we be using entities???

File:
1 edited

Legend:

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

    r5119 r5132  
    1010  <xsl:param name="interface_name"/>
    1111  <xsl:param name="library_name"/>
     12
     13  <!-- some global variables -->
     14  <xsl:variable name="colour-button-text">#345437</xsl:variable>
     15  <xsl:variable name="colour-navbar-link-text">#345437</xsl:variable>
     16  <xsl:variable name="colour-navbar-selected-text">#c6aa69</xsl:variable>
    1217
    1318  <!-- the main page layout template is here -->
     
    2126      </td>
    2227      <td>
    23       <!--<center>-->
    2428        <table width="100%">
    2529          <tr><td>
     
    2832        </td></tr>
    2933        </table>
    30       <!--</center>-->
    3134      </td>
    3235    </table>
     
    4447  </xsl:attribute-set>
    4548   
     49  <xsl:attribute-set name="td-brownbutton">
     50    <xsl:attribute name='background'>interfaces/default/images/brownbutton.gif</xsl:attribute>
     51    <xsl:attribute name='height'>20</xsl:attribute>
     52    <xsl:attribute name='align'>center</xsl:attribute>
     53  </xsl:attribute-set>
     54 
     55  <xsl:attribute-set name="td-brownbutton-off">
     56    <xsl:attribute name='background'>interfaces/default/images/greenbar.gif</xsl:attribute>
     57    <xsl:attribute name='height'>20</xsl:attribute>
     58    <xsl:attribute name='align'>center</xsl:attribute>
     59  </xsl:attribute-set>
     60 
    4661  <xsl:template name="greenstonePageBanner">
    4762    <center>
     
    7792  <xsl:template name="standardPageBanner">
    7893    <xsl:param name="collName"/>
     94    <xsl:param name="pageType"/>
    7995    <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
    8096    <table width="100%">
     
    105121      <table cellspacing='4'>
    106122        <tr>
    107           <td height='20' background='interfaces/default/images/brownbutton.gif'>
     123          <td xsl:use-attribute-sets="td-brownbutton">
    108124        <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=home">
    109           <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home')"/></b>
     125          <b><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/></font></b>
    110126        </a>
    111127          </td>
    112           <td height='20' background='interfaces/default/images/brownbutton.gif'>
    113         <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=help">
    114           <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help')"/></b>
    115         </a>
    116           </td>
    117           <td height='20' background='interfaces/default/images/brownbutton.gif'>
    118         <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=pref">
    119           <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref')"/></b>
    120         </a>
    121         </td></tr>
     128          <xsl:choose>
     129        <xsl:when test="$pageType='help'">
     130          <td xsl:use-attribute-sets="td-brownbutton-off">
     131            <b><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></font></b>
     132          </td>
     133        </xsl:when>
     134        <xsl:otherwise>
     135          <td xsl:use-attribute-sets="td-brownbutton">
     136            <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}">
     137              <b><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></font></b>
     138            </a>
     139          </td>
     140        </xsl:otherwise>
     141          </xsl:choose>
     142          <xsl:choose>
     143        <xsl:when test="$pageType='pref'">
     144          <td xsl:use-attribute-sets="td-brownbutton-off">
     145            <b><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></font></b>
     146          </td>
     147        </xsl:when>
     148        <xsl:otherwise>
     149          <td xsl:use-attribute-sets="td-brownbutton">
     150            <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}">
     151              <b><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></font></b>
     152            </a>
     153          </td>
     154        </xsl:otherwise>
     155          </xsl:choose>
     156        </tr>
    122157      </table>
    123158    </td>
    124159      </tr>
    125160    </table>
     161    <p/>
    126162  </xsl:template>
    127163
     
    144180      <xsl:choose>
    145181        <xsl:when test="$action='CURRENT'">
    146           <td>&#160;</td><td align='center' ><b><nobr>&#160;<font size='+1' color='#c6aa69'><xsl:value-of select="displayItem[@name='name']"/></font>&#160;</nobr></b></td><td height='17'>&#160;</td>
     182          <td>&#160;</td><td align='center' ><b><nobr>&#160;<font size='+1' color='{$colour-navbar-selected-text}'><xsl:value-of select="displayItem[@name='name']"/></font>&#160;</nobr></b></td><td height='17'>&#160;</td>
    147183        </xsl:when>
    148184        <xsl:when test="$action !='DO_NOT_DISPLAY'">
    149           <td>&#160;</td><td align='center'><a style="text-decoration:none" href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:attribute name='onMouseOver'>rollover('<xsl:value-of select="displayItem[@name='description']"/>')</xsl:attribute><b><nobr>&#160;<font size='+1' color='#345437'><xsl:value-of select="displayItem[@name='name']"/></font>&#160;</nobr></b></a></td><td>&#160;</td>
     185          <td>&#160;</td><td align='center'><a style="text-decoration:none" href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:attribute name='onMouseOver'>rollover('<xsl:value-of select="displayItem[@name='description']"/>')</xsl:attribute><b><nobr>&#160;<font size='+1' color='{$colour-navbar-link-text}'><xsl:value-of select="displayItem[@name='name']"/></font>&#160;</nobr></b></a></td><td>&#160;</td>
    150186        </xsl:when>
    151187      </xsl:choose>
Note: See TracChangeset for help on using the changeset viewer.