Changeset 19926


Ignore:
Timestamp:
2009-06-26T13:26:04+12:00 (15 years ago)
Author:
kjdon
Message:

modified to work with new gs3 interface, while still workign with gs2 interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/sites/localsite/collect/gberg/transform/about.xsl

    r18461 r19926  
    44  xmlns:java="http://xml.apache.org/xslt/java"
    55  xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
     6  xmlns:gslib="http://www.greenstone.org/skinning"
    67  extension-element-prefixes="java util"
    78  exclude-result-prefixes="java util">
     
    1213  <xsl:output method="html"/> 
    1314 
    14     <!-- the main page layout template is here -->
     15  <!-- the main page layout template is here -->
    1516  <xsl:template match="page">
    16    
    1717    <xsl:choose>
    18     <!-- if we are using the classic GS2 look and feel use this template otherwise use the default GS3 look and feel template -->
     18      <!-- if we are using the classic GS2 look and feel use this template otherwise use the default GS3 look and feel template -->
    1919      <xsl:when test="$interface_name = 'gs2'">
    20     <html>
    21     <head>
    22       <title>
    23     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    24     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    25       </title>
    26       <xsl:call-template name="globalStyle"/>
    27       <xsl:call-template name="pageStyle"/>
    28     </head>
    29       <body class="bgimage">
    30     <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    31     <div id="page">
    32        <xsl:apply-templates select="pageResponse"/>
    33        <xsl:call-template name="greenstoneFooter"/>                   
    34     </div>
    35       </body>
    36     </html>
     20    <html>
     21      <head>
     22        <title>
     23          <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     24          <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     25        </title>
     26        <xsl:call-template name="globalStyle"/>
     27        <xsl:call-template name="pageStyle"/>
     28      </head>
     29      <body class="bgimage">
     30        <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
     31        <div id="page">
     32          <xsl:apply-templates select="pageResponse"/>
     33          <xsl:call-template name="greenstoneFooter"/>                     
     34        </div>
     35      </body>
     36    </html>
    3737      </xsl:when>
     38      <!-- default gs3 mode -->
     39      <xsl:otherwise>
     40    <html>
     41      <head>
     42        <title>
     43          <gslib:aboutCollectionPageTitle/>
     44        </title>
     45        <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/>
     46      </head>
     47     
     48      <body><gslib:textDirectionAttribute/>
    3849
    39       <xsl:otherwise>   
    40         <html>
    41     <head>
    42       <title>
    43     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    44     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    45       </title>
    46       <xsl:call-template name="globalStyle"/>
    47       <xsl:call-template name="pageStyle"/>
    48     </head>
    49           <body>
    50            <div id="page-wrapper">
    51           <xsl:call-template name="response" />
    52           <xsl:call-template name="greenstoneFooter"/>
    53        </div>
    54           </body>
    55         </html>
     50        <div id="page-wrapper">
     51          <gslib:displayErrorsIfAny/>
     52
     53          <div id="banner">   
     54        <p>
     55          <gslib:collectionHomeLinkWithLogoIfAvailable/>
     56        </p>
     57        <ul id="bannerlist">
     58          <li><gslib:homeButtonTop/></li>
     59          <li><gslib:helpButtonTop/></li>
     60          <li><gslib:preferencesButtonTop/></li>
     61        </ul>
     62          </div>
     63         
     64          <!--If some services are available for the current collection display the navigation bar-->
     65          <xsl:choose>
     66        <xsl:when test="serviceList/service">
     67          <div id="navbar">
     68            <ul id="navbarlist">
     69              <gslib:servicesNavigationBar/>
     70            </ul>
     71          </div>
     72        </xsl:when>
     73        <!--Otherwise simply display a blank divider bar-->
     74        <xsl:otherwise>
     75          <div class="divbar"><gslib:noTextBar/></div>         
     76        </xsl:otherwise>
     77          </xsl:choose>
     78         
     79          <div id="content">
     80        <!--Display the description text of the current collection,
     81        and if some services are available then create a list
     82        of links for each service within a <ul id="servicelist"> element.-->
     83        <gslib:collectionDescriptionTextAndServicesLinks/>
     84          </div>
     85
     86          <div id="footer">
     87        <div class="divbar"><gslib:poweredByGS3TextBar/></div>
     88          </div>
     89        </div>
     90      </body>
     91    </html>
    5692      </xsl:otherwise>
    5793    </xsl:choose>
    5894  </xsl:template>
    59  
     95   
    6096
    6197
     
    72108  </xsl:template>
    73109
    74   <xsl:template match="collection">
     110  <!-- this is for gs2 mode -->
     111  <xsl:template match="collection" priority="5">
     112    <xsl:if test="$interface_name = 'gs2'">
    75113    <xsl:variable name="collName" select="@name"/>
    76114    <xsl:call-template name="standardPageBanner">
     
    80118    <xsl:call-template name="navigationBar">
    81119      <xsl:with-param name="collName" select="$collName"/>
    82     </xsl:call-template>     
     120    </xsl:call-template>   
     121    </xsl:if>   
    83122    <p/><xsl:value-of select="displayItem[@name='description']" disable-output-escaping='yes'/>
    84123    <p/><xsl:apply-templates select="documentList">
Note: See TracChangeset for help on using the changeset viewer.