Changeset 3989 for trunk


Ignore:
Timestamp:
2003-03-25T16:21:02+12:00 (21 years ago)
Author:
mdewsnip
Message:

Updated to reflect changes in page elements (for better image handling)

Location:
trunk/gsdl3/interfaces/default/transform
Files:
5 edited

Legend:

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

    r3876 r3989  
    1010
    1111<xsl:template match="page">
    12 <xsl:variable name="collName" select="request/paramList/param[@name='c']/@value"/>
     12<xsl:variable name="collName" select="pageRequest/paramList/param[@name='c']/@value"/>
    1313<html>
    1414<xsl:call-template name="greenstoneHead"/>
     
    1717<table width='537'>
    1818<tr><td>
    19 <xsl:apply-templates select="response/collection|response/serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
     19<xsl:apply-templates select="pageResponse/collection|pageResponse/serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
    2020</td></tr></table>
    2121</center>
     
    2828<xsl:param name="collName">coll-name</xsl:param>
    2929<xsl:if test='name()="collection"'>
    30 <xsl:call-template name="collectionPageBanner">
    31 <xsl:with-param name="collName" select="$collName"/>
    32 <xsl:with-param name="collIcon" select="metadataList/metadata[@name='colIcon']"/>
    33 </xsl:call-template>
     30  <xsl:call-template name="collectionPageBanner">
     31    <xsl:with-param name="collName" select="$collName"/>
     32    <xsl:with-param name="httpPath" select="metadataList/metadata[@name='httpPath']"/>
     33    <xsl:with-param name="collIcon" select="metadataList/metadata[@name='colIcon']"/>
     34  </xsl:call-template>
    3435</xsl:if>
    3536<xsl:if test='name()="serviceCluster"'>
  • trunk/gsdl3/interfaces/default/transform/basicquery.xsl

    r3890 r3989  
    66<xsl:include href="service-params.xsl"/>
    77
    8 <xsl:output method="html"/> 
     8<xsl:output method="html"/>
     9
    910
    1011<xsl:template match="page">
     12  <xsl:variable name="collName" select="pageRequest/paramList/param[@name='c']/@value"/>
    1113
    12 <xsl:variable name="collName">
    13   <xsl:value-of select="request/paramList/param[@name='c']/@value"/>
    14 </xsl:variable>
     14  <html>
     15    <xsl:call-template name="greenstoneHead"/>
     16    <body xsl:use-attribute-sets="body-style">
     17      <table border="0" cellspacing="0" cellpadding="0" width="100%">
     18        <td valign="top" width="65">
     19          <img src="interfaces/default/images/spacer.gif" width="65" height="1" alt="" border="0"/>
     20        </td>
     21        <td/>
     22        <center>
     23          <table width="537">
     24            <tr/>
     25        <td/>
     26        <xsl:apply-templates select="pageResponse">
     27          <xsl:with-param name="collName" select="$collName"/>
     28        </xsl:apply-templates>
     29            <xsl:call-template name="greenBar"/>
     30            <xsl:call-template name="greenstoneFooter"/>
     31          </table>
     32        </center>
     33      </table>
     34    </body>
     35  </html>
     36</xsl:template>
    1537
    16 <html>
    17 <xsl:call-template name="greenstoneHead"/>
    18 <body xsl:use-attribute-sets="body-style">
    1938
    20 <table border="0" cellspacing="0" cellpadding="0" width="100%">
    21 <tr/><td valign="top" width="65"><img src="interfaces/default/images/spacer.gif" width="65" height="1" alt="" border="0"></img></td>
    22 <td/><center><table width="537"><tr/><td/>
     39<xsl:template match="pageResponse">
     40  <xsl:param name="collName"/>
    2341
    24 <center>
    25 <xsl:call-template name="collectionPageBanner">
    26 <xsl:with-param name="collName" select="$collName"/>
    27 </xsl:call-template>
    28 <xsl:apply-templates select="service">
    29 <xsl:with-param name="collName" select="$collName"/>
    30 </xsl:apply-templates>
    31 </center>
    32 <xsl:apply-templates select="response">
    33 <xsl:with-param name="collName" select="$collName"/>
    34 </xsl:apply-templates>
    35 <xsl:call-template name="greenBar"/>
    36 <xsl:call-template name="greenstoneFooter"/>
     42  <center>
     43    <xsl:call-template name="collectionPageBanner">
     44      <xsl:with-param name="collName" select="$collName"/>
     45      <xsl:with-param name="collIcon" select="collection/metadataList/metadata[@name='colIcon']"/>
     46      <xsl:with-param name="httpPath" select="collection/metadataList/metadata[@name='httpPath']"/>
     47    </xsl:call-template>
     48    <xsl:apply-templates select="service">
     49      <xsl:with-param name="collName" select="$collName"/>
     50    </xsl:apply-templates>
     51  </center>
    3752
    38 </table></center>
    39 </table>
    40 </body>
    41 </html>
     53  <!-- Process the query response -->
     54  <xsl:if test="documentNodeList">
     55    <xsl:call-template name="greenBarResults"/>
     56
     57    <!-- If query term information is available, display it -->
     58    <br/>
     59    <xsl:if test="count(termList/term) > 0">
     60      <small>
     61        Word count:
     62        <xsl:for-each select="termList/term">
     63          <xsl:if test="position() > 1">, </xsl:if>
     64          <xsl:value-of select="@name"/>: <xsl:value-of select="@freq"/>
     65        </xsl:for-each>
     66      </small>
     67      <br/>
     68    </xsl:if>
     69
     70    <!-- If the number of matching documents is known, display it -->
     71    <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']/@value"/>
     72    <xsl:if test="$numDocsMatched">
     73      <xsl:choose>
     74        <xsl:when test="$numDocsMatched='0'">
     75          No documents matched the query.
     76        </xsl:when>
     77        <xsl:when test="$numDocsMatched='1'">
     78          1 document matched the query.
     79        </xsl:when>
     80        <xsl:otherwise>
     81          <xsl:value-of select="$numDocsMatched"/> documents matched the query.
     82        </xsl:otherwise>
     83      </xsl:choose>
     84    </xsl:if>
     85
     86    <!-- Display the matching documents -->
     87    <table>
     88      <tr valign="top">
     89        <xsl:for-each select="documentNodeList/documentNode">
     90          <tr>
     91            <xsl:apply-templates select=".">
     92              <xsl:with-param name="collName" select="$collName"/>
     93            </xsl:apply-templates>
     94          </tr>
     95        </xsl:for-each>
     96      </tr>
     97    </table>
     98  </xsl:if>
    4299</xsl:template>
     100
    43101
    44102<xsl:template match="service">
     
    57115</form>
    58116</xsl:template>
     117
    59118
    60119<xsl:template match="paramList">
     
    99158
    100159
    101 <!-- Process the query response -->
    102 <xsl:template match="response">
    103   <xsl:param name="collName">coll-name</xsl:param>
    104   <xsl:call-template name="greenBarResults"/>
     160<xsl:template match="documentNode">
     161  <xsl:param name="collName"/>
     162  <xsl:variable name="library" select="ancestor::page/config/library_name"/>
    105163
    106   <!-- If query term information is available, display it -->
    107   <br/>
    108   <xsl:if test="count(termList/term) > 0">
    109     <small>
    110     Word count:
    111     <xsl:for-each select="termList/term">
    112       <xsl:if test="position() > 1">, </xsl:if>
    113       <xsl:value-of select="@name"/>: <xsl:value-of select="@freq"/>
    114     </xsl:for-each>
    115     </small><br/>
    116   </xsl:if>
    117 
    118   <!-- If the number of matching documents is known, display it -->
    119   <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']/@value"/>
    120   <xsl:if test="$numDocsMatched">
    121     <xsl:choose>
    122       <xsl:when test="$numDocsMatched='0'">
    123         No documents matched the query.
    124       </xsl:when>
    125       <xsl:when test="$numDocsMatched='1'">
    126         1 document matched the query.
    127       </xsl:when>
    128       <xsl:otherwise>
    129         <xsl:value-of select="$numDocsMatched"/> documents matched the query.
    130       </xsl:otherwise>
    131     </xsl:choose>
    132   </xsl:if>
    133 
    134   <!-- Display the matching documents -->
    135   <table>
    136     <tr valign="top">
    137       <xsl:for-each select="documentNodeList/documentNode">
    138         <tr>
    139           <xsl:apply-templates select=".">
    140             <xsl:with-param name="collName" select="$collName"/>
    141           </xsl:apply-templates>
    142         </tr>
    143       </xsl:for-each>
    144     </tr>
    145   </table>
    146 </xsl:template>
    147 
    148 
    149 <xsl:template match="documentNode">
    150   <xsl:param name="collName">coll-name</xsl:param>
    151   <xsl:variable name="library" select="ancestor::page/config/library_name"/>
    152    
    153164  <td>
    154165  <a><xsl:attribute name="href"><xsl:value-of select='$library'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if></xsl:attribute>
  • trunk/gsdl3/interfaces/default/transform/document.xsl

    r3962 r3989  
    1313
    1414<xsl:template match="page">
    15   <xsl:variable name="collName" select="request/paramList/param[@name='c']/@value"/>
     15  <xsl:variable name="collName" select="pageRequest/paramList/param[@name='c']/@value"/>
    1616
    1717  <html>
     
    2424
    2525    <body xsl:use-attribute-sets="body-style">
    26       <center>
    27         <xsl:call-template name="collectionPageBanner">
    28           <xsl:with-param name="collName" select="$collName"/>
    29         </xsl:call-template>
    30 
    31     <!-- Display table of contents -->
    32     <p/>
    33         <table width="537" cellpadding="0" cellspacing="0">
    34           <tr>
    35             <xsl:apply-templates select="response/document">
    36               <xsl:with-param name="collName" select="$collName"/>
    37             </xsl:apply-templates>
    38           </tr>
    39         </table>
    40 
    41     <!-- Display document content -->
    42         <p/>
    43         <table width="537" cellpadding="0" cellspacing="0">
    44           <tr>
    45         <td align="left">
    46           <xsl:value-of disable-output-escaping="yes" select="descendant::documentNode/nodeContent"/>
    47         </td>
    48       </tr>
    49         </table>
    50       </center>
    51 
     26      <xsl:apply-templates select="pageResponse">
     27        <xsl:with-param name="collName" select="$collName"/>
     28      </xsl:apply-templates>
    5229      <xsl:call-template name="greenstoneFooter"/>
    5330    </body>
     
    5633
    5734
     35<xsl:template match="pageResponse">
     36  <xsl:param name="collName"/>
     37
     38  <center>
     39    <xsl:call-template name="collectionPageBanner">
     40      <xsl:with-param name="collName" select="$collName"/>
     41      <xsl:with-param name="collIcon" select="collection/metadataList/metadata[@name='colIcon']"/>
     42      <xsl:with-param name="httpPath" select="collection/metadataList/metadata[@name='httpPath']"/>
     43    </xsl:call-template>
     44
     45    <!-- Display table of contents -->
     46    <p/>
     47    <table width="537" cellpadding="0" cellspacing="0">
     48      <tr>
     49        <xsl:apply-templates select="document">
     50          <xsl:with-param name="collName" select="$collName"/>
     51        </xsl:apply-templates>
     52      </tr>
     53    </table>
     54
     55    <!-- Display document content -->
     56    <p/>
     57    <table width="537" cellpadding="0" cellspacing="0">
     58      <tr>
     59    <td align="left">
     60      <xsl:value-of disable-output-escaping="yes" select="descendant::documentNode/nodeContent"/>
     61    </td>
     62      </tr>
     63    </table>
     64  </center>
     65</xsl:template>
     66
     67
    5868<xsl:template match="document">
    59   <xsl:param name="collName">coll-name</xsl:param>
     69  <xsl:param name="collName"/>
    6070
    6171  <!-- Display table of contents -->
    6272  <td valign="top" align="left" width="200">
    63     <img src="interfaces/default/images/cover.jpg"/> <!-- TO DO -->
     73    <img src="cover.jpg"/> <!-- TO DO -->
    6474  </td>
    6575  <td valign="top">
     
    7383
    7484<xsl:template match="documentNode">
    75   <xsl:param name="collName">coll-name</xsl:param>
     85  <xsl:param name="collName"/>
    7686  <xsl:param name="depth"/>
    7787  <xsl:variable name="library" select="ancestor::page/config/library_name"/>
  • trunk/gsdl3/interfaces/default/transform/home.xsl

    r3709 r3989  
    1414<xsl:call-template name="greenstonePageBanner"/>
    1515<center>
    16 <xsl:apply-templates select="response/collectionList"/>
    17 <xsl:apply-templates select="response/serviceClusterList"/>
    18 <xsl:apply-templates select="response/serviceList"/>
     16<xsl:apply-templates select="pageResponse/collectionList"/>
     17<xsl:apply-templates select="pageResponse/serviceClusterList"/>
     18<xsl:apply-templates select="pageResponse/serviceList"/>
    1919</center>
    2020<xsl:call-template name="greenstoneFooter"/>
     
    2727<xsl:template match="collectionList">
    2828<xsl:for-each select="collection">
    29 <p><a><xsl:attribute name='href'><xsl:value-of select="ancestor::page/config/library_name"/>?a=p&amp;sa=about&amp;c=<xsl:value-of select='@name'/></xsl:attribute><img width="150" border="1"><xsl:attribute name="src">sites/<xsl:value-of select="ancestor::page/config/site_name"/>/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="metadataList/metadata[@name='colIcon']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="metadataList/metadata[@name='colName']"/></xsl:attribute></img></a></p>
     29<p>
     30  <a>
     31    <xsl:attribute name='href'>
     32      <xsl:value-of select="ancestor::page/config/library_name"/>?a=p&amp;sa=about&amp;c=<xsl:value-of select='@name'/>
     33    </xsl:attribute>
     34    <img width="150" border="1">
     35      <xsl:attribute name="src">
     36        <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/<xsl:value-of select="metadataList/metadata[@name='colIcon']"/>
     37      </xsl:attribute>
     38      <xsl:attribute name="alt">
     39        <xsl:value-of select="metadataList/metadata[@name='colName']"/>
     40      </xsl:attribute>
     41    </img>
     42  </a>
     43</p>
    3044</xsl:for-each>
    3145<xsl:call-template name="greenBar"/>
  • trunk/gsdl3/interfaces/default/transform/style.xsl

    r3888 r3989  
    6060
    6161<xsl:template name="collectionPageBanner">
    62 <xsl:param name="collName">coll-name</xsl:param>
    63 <xsl:param name="collIcon"><xsl:value-of select="$collName"/>.gif</xsl:param>
    64 <xsl:variable name="library" select="ancestor::page/config/library_name"/>
    65 <table width="537">
    66 <tr><td align="left"><a href="{$library}?a=p&amp;sa=about&amp;c={$collName}"><img width="150" border="1"><xsl:attribute name="src">sites/<xsl:value-of select="ancestor::page/config/site_name"/>/collect/<xsl:value-of select="$collName"/>/images/<xsl:value-of select="$collIcon"/></xsl:attribute><xsl:attribute name="alt"><xsl:call-template name="text"><xsl:with-param name="key">aboutpage</xsl:with-param></xsl:call-template></xsl:attribute></img></a></td><td align="right"><a href="{$library}?a=p&amp;sa=home"><xsl:call-template name="text"><xsl:with-param name="key">home</xsl:with-param></xsl:call-template></a></td></tr></table>
    67 
    68 <xsl:call-template name="greenBar"/>
    69 </xsl:template>
     62  <xsl:param name="collName">coll-name</xsl:param>
     63  <xsl:param name="httpPath"/>
     64  <xsl:param name="collIcon"/>
     65  <xsl:variable name="library" select="ancestor::page/config/library_name"/>
     66  <table width="537">
     67    <tr>
     68      <td align="left">
     69        <a href="{$library}?a=p&amp;sa=about&amp;c={$collName}">
     70          <img width="150" border="1">
     71            <xsl:attribute name="src">
     72              <xsl:value-of select="$httpPath"/>/<xsl:value-of select="$collIcon"/>
     73            </xsl:attribute>   
     74            <!-- <xsl:attribute name="src">sites/<xsl:value-of select="ancestor::page/config/site_name"/>/collect/<xsl:value-of select="$collName"/>/images/<xsl:value-of select="$collIcon"/></xsl:attribute> -->
     75        <xsl:attribute name="alt">
     76          <xsl:call-template name="text">
     77            <xsl:with-param name="key">aboutpage</xsl:with-param>
     78          </xsl:call-template>
     79        </xsl:attribute>
     80      </img>
     81        </a>
     82      </td>
     83      <td align="right">
     84        <a href="{$library}?a=p&amp;sa=home">
     85          <xsl:call-template name="text">
     86        <xsl:with-param name="key">home</xsl:with-param>
     87      </xsl:call-template>
     88        </a>
     89      </td>
     90    </tr>
     91  </table>
     92
     93  <xsl:call-template name="greenBar"/>
     94</xsl:template>
     95
    7096
    7197<!-- do we want different stuff for cluster or same as collection -->
Note: See TracChangeset for help on using the changeset viewer.