Ignore:
Timestamp:
2006-11-15T11:05:47+13:00 (17 years ago)
Author:
shaoqun
Message:

now replace table tags and other formating tags with div tages to make changing styles easier

Location:
trunk/gsdl3/web/interfaces/default/transform
Files:
2 edited

Legend:

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

    r12152 r13268  
    3232
    3333  <xsl:template match="pageResponse">
    34  
    35     <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
    36     <!-- <center>-->
     34    <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
    3735    <xsl:call-template name="standardPageBanner">
    3836      <xsl:with-param name="collName" select="$collName"/>
     
    4139      <xsl:with-param name="collName" select="$collName"/>
    4240    </xsl:call-template>
     41    <div class="document">
    4342    <xsl:apply-templates select="service">
    4443      <xsl:with-param name="collName" select="$collName"/>
    4544    </xsl:apply-templates>
    46     <!--  </center>-->
     45   
    4746    <!--<xsl:if test="$berryBaskets = 'true'">-->
    4847    <xsl:if test="$berrybasketswitch = 'on'">
     
    5453      </xsl:call-template>
    5554    </xsl:if>
    56     <xsl:call-template name="dividerBar"/>
    57   </xsl:template>
     55    </div>
     56   </xsl:template>
    5857
    5958
     
    6766    <xsl:call-template name="matchDocs"/>
    6867   
    69     <!-- next and prev links at top of results-->
     68     <!-- next and prev links at top of results-->
     69   
    7070    <xsl:call-template name="resultNavigation">
    7171      <xsl:with-param name="collName" select="$collName"/>
    7272    </xsl:call-template>
    73     <!-- Display the matching documents -->
     73   
     74    <!-- Display the matching documents --> 
     75   
    7476    <xsl:call-template name="resultList">
    7577      <xsl:with-param name="collName" select="$collName"/>
    7678    </xsl:call-template>
     79   
    7780    <!-- next and prev links at bottom of page -->
    7881    <xsl:call-template name="resultNavigation">
    7982      <xsl:with-param name="collName" select="$collName"/>
    8083    </xsl:call-template>
     84
    8185  </xsl:template>
    8286 
     
    8589    <xsl:param name="collName"/>
    8690    <xsl:variable name="subaction" select="../pageRequest/@subaction"/>
     91    <div class="queryform">
    8792    <form name="QueryForm" method="get" action="{$library_name}">
    8893      <input type="hidden" name="a" value="q"/>
     
    95100      </xsl:if>
    96101      <xsl:apply-templates select="paramList"/>
    97       <br/>
    98102      <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
    99103    </form>
     104    </div>
    100105  </xsl:template>
    101106   
  • trunk/gsdl3/web/interfaces/default/transform/querytools.xsl

    r12152 r13268  
    1010  <xsl:template name="resultNavigation">
    1111    <xsl:param name="collName"/>
    12     <!-- hits type -->
     12   <div class="resultnavigation"> 
     13  <!-- hits type -->
    1314    <xsl:variable name='ht'>
    1415      <xsl:choose>
     
    5758      <xsl:variable name="next" select="$here + 1"/>
    5859      <xsl:variable name="page-param"><xsl:if test="$ht='s'">s1.</xsl:if>startPage</xsl:variable>
    59       <p />
    60       <center>
    61     <table cellspacing='0' cellpadding='0' width='70%'>
    62       <tr>
    63         <td align='left'>
    64           <xsl:if test="$here &gt; 1"><a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hpp + 1)"/> - <xsl:value-of select="number(($prev * $hpp))"/></a></xsl:if>
    65         </td>
    66         <td align='right'>
     60     
     61      <div>   
     62      <div>
     63         <xsl:if test="$here &gt; 1"><a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hpp + 1)"/> - <xsl:value-of select="number(($prev * $hpp))"/></a></xsl:if>
     64       
     65       
    6766          <xsl:if test="(($here * $hpp) + 1)  &lt; $td">
    6867        <xsl:variable name='m' select="number($next * $hpp)"/>
    6968        <xsl:variable name='mm'><xsl:choose><xsl:when test="$m &lt; $td"><xsl:value-of select='$m'/></xsl:when><xsl:otherwise><xsl:value-of select='$td'/></xsl:otherwise></xsl:choose></xsl:variable>
    70         <a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$next}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hpp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></td> </tr>
    71     </table>
    72       </center>
    73     </xsl:if>
     69        <a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$next}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hpp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></div>
     70    </div>
     71     </xsl:if>
     72   </div>
    7473  </xsl:template>
    7574   
    7675  <xsl:template name="matchDocs">
    7776    <!-- If the number of matching documents is known, display it -->
     77    <div class="matchdocs">
    7878    <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']"/>
    7979    <xsl:variable name="numDocsReturned" select="metadataList/metadata[@name='numDocsReturned']"/>
     
    9393      </xsl:when>
    9494    </xsl:choose>
     95   </div>
    9596  </xsl:template>
    9697
    9798  <!-- paging is now done by the query action, so here we just print out all the docs that we have -->
    9899  <xsl:template name="resultList">
    99     <xsl:param name="collName"/>
    100     <table>
    101       <xsl:for-each select="documentNodeList/documentNode">
    102     <tr>
     100     <xsl:param name="collName"/>
     101    <table class="resultlist">
     102     <xsl:for-each select="documentNodeList/documentNode">
     103    <tr class="resultitem">
    103104      <xsl:call-template name="documentNodeWrapper">
    104105        <xsl:with-param name="collName" select="$collName"/>
     
    106107      </xsl:call-template>
    107108    </tr>       
    108       </xsl:for-each>
    109     </table>   
     109      </xsl:for-each> 
     110    </table>
    110111  </xsl:template>
    111112 
     
    133134    <xsl:param name="collName"/>
    134135    <xsl:param name="serviceName"/>
    135     <td>
    136       <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?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>&amp;dt=<xsl:value-of select='@docType'/>&amp;p.a=q&amp;&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xsl:value-of select="$serviceName"/></xsl:attribute>
     136     <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?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>&amp;dt=<xsl:value-of select='@docType'/>&amp;p.a=q&amp;&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xsl:value-of select="$serviceName"/></xsl:attribute>
    137137    <xsl:apply-templates select="." mode="displayNodeIcon"/>
    138138      </a>
    139     </td>
    140     <td><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></td>
     139    <span><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
    141140  </xsl:template>
    142141
    143142  <xsl:template name="termInfo">
     143   <div class="terminfo">
    144144    <xsl:if test="count(termList/term) > 0">
    145       <small>
    146     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.wordcount')"/>
     145     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.wordcount')"/>
    147146    <xsl:for-each select="termList/term">
    148147      <xsl:if test="position() > 1">, </xsl:if>
    149148      <xsl:value-of select="@name"/>: <xsl:value-of select="@freq"/>
    150149    </xsl:for-each>
    151       </small>
    152       <br/>
    153150    </xsl:if>
     151  </div>
    154152  </xsl:template>
    155153
Note: See TracChangeset for help on using the changeset viewer.