Changeset 14573 for greenstone3/trunk


Ignore:
Timestamp:
2007-09-25T16:10:31+12:00 (17 years ago)
Author:
qq6
Message:

updated styles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/classic/transform/document.xsl

    r14541 r14573  
    6363  <xsl:template match="document">
    6464    <xsl:param name="collName"/>
    65    
     65    <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
     66   <xsl:if test="$external != ''">
     67      <xsl:call-template name="externalPage">
     68    <xsl:with-param name="external" select="$external"/>
     69      </xsl:call-template>
     70    </xsl:if>
     71
     72    <xsl:if test="$external = ''">
    6673    <xsl:call-template name="documentHeading">
    6774      <xsl:with-param name="collName" select="$collName"/>
     
    7885    </xsl:call-template>
    7986    <br/>
     87      </xsl:if>
    8088  </xsl:template>
    8189 
     
    124132    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
    125133    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
    126    
    127    
    128     <div class="heading_image">
    129        <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">       
    130     <xsl:call-template name="coverImage"/>
    131        </xsl:if>
    132     </div>
    133    
    134     <div class="buttons" id="toc_buttons">
    135         <xsl:call-template name="documentButtons">
    136         <xsl:with-param name="collName" select="$collName"/>
    137     </xsl:call-template>
    138     </div>
    139 
    140     <!--<div><xsl:call-template name="enrichServices">
     134    <div id="documentheading">
     135      <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title">Close this book and return to search/browse</xsl:with-param>
     136      </xsl:call-template></a>
     137         <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
     138  </div>
     139
     140 <div id="docheadwrapper">
     141  <div id="documentinfo">
     142        <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
     143          <div id="headingimage">
     144             <xsl:call-template name="coverImage"/>
     145          </div>
     146        </xsl:if>
     147     
     148        <ul id="docbuttons" >
     149         <xsl:call-template name="documentButtons">
     150       <xsl:with-param name="collName" select="$collName"/>
     151         </xsl:call-template>
     152       </ul>
     153  </div>
     154   
     155      <!--<div><xsl:call-template name="enrichServices">
    141156        <xsl:with-param name="collName" select="$collName"/>
    142157      </xsl:call-template></div>-->
    143158
    144     <div class="toc">
    145         <table class="v_list"><tr valign="top"><td valign="top"> <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$collName}&amp;rt=r"><xsl:call-template name="openbookimg"><xsl:with-param name="title">Close this book and return to search/browse</xsl:with-param>
    146       </xsl:call-template></a></td><td valign="top"></td>
    147          <td valign="top">
    148         <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
    149           </td></tr>
    150          </table>
    151         <xsl:if test="string($doTOC) != 'false'">
    152       <table><tr valign="top"><td><img alt="" src="/gsdl/images/space.gif" width="25"/></td><td><table class="v_list">
    153         <xsl:call-template name="TOC">
    154           <xsl:with-param name="collName" select="$collName"/>
    155         </xsl:call-template>
    156         </table>
    157           </td></tr></table>
    158     </xsl:if>         
     159    <xsl:if test="string($doTOC) != 'false'">
     160       <div id="toc">
     161     <xsl:call-template name="TOC">
     162       <xsl:with-param name="collName" select="$collName"/>
     163     </xsl:call-template>
    159164      </div>
     165    </xsl:if>
     166    </div>
    160167   </xsl:template>
    161168
     
    257264   
    258265    <xsl:if test="documentNode[@nodeID]">
    259     <tr valign='top'><td>
     266    <ul id="tocnodes">
     267    <li>
    260268        <xsl:choose><xsl:when test="string($oc)='0'">
    261269        <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title">open the table of contents</xsl:with-param></xsl:call-template></a>
    262270          </xsl:when>
    263271          <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title">close the table of contents</xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose>
    264       </td><td>Table of Contents</td></tr>
     272      Table of Contents
    265273    <xsl:if test="string($oc)!='0'">
    266       <tr><td>&#160;</td><td>
    267           <table>
     274      <ul class="tocnode">
    268275        <xsl:for-each select="documentNode/documentNode[@nodeID]">
    269276          <xsl:apply-templates select='.'>
     
    278285        </xsl:apply-templates>
    279286        </xsl:for-each>
    280           </table>
    281         </td></tr>
    282     </xsl:if>
     287         </ul>
     288      </xsl:if>
     289 </li>
     290      </ul>
    283291    </xsl:if>
    284292  </xsl:template>
     
    296304    <!-- Display the appropriate image, depending on the node type -->
    297305       
    298     <tr><td valign="top">
     306     <li>
    299307    <!--
    300308    <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="documentNode">.pr</xsl:if><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if><xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if></xsl:attribute>
     
    305313      <xsl:apply-templates select="." mode="displayNodeIcon"/>
    306314    </a>
    307       </td>
    308315     
    309316      <!-- Display associated title, bolded if the node has content -->
    310       <td valign="top">
    311317    <xsl:choose>
    312318      <xsl:when test="nodeContent">
    313         <b><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></b>
     319         <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
    314320      </xsl:when>
    315321      <xsl:otherwise>
     
    317323      </xsl:otherwise>
    318324    </xsl:choose>
    319       </td>
    320     </tr>
     325
    321326    <!-- Apply recursively to the children of this node -->
    322327    <xsl:if test="documentNode[@nodeID]">
    323       <tr><td>&#160;</td><td><table>
    324         <xsl:apply-templates select="documentNode[@nodeID]">
     328     
     329         <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
    325330          <xsl:with-param name="collName" select="$collName"/>
    326331          <xsl:with-param name="ec" select="$ec"/>
     
    330335          <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
    331336        </xsl:apply-templates>
    332       </table>
    333     </td></tr>
    334     </xsl:if>
     337       </ul>
     338      </xsl:if>
     339    </li>
    335340  </xsl:template>
    336341 
     
    490495    </xsl:for-each>
    491496  </xsl:template>
    492  
     497
     498  <xsl:template name="externalPage">
     499    <xsl:param name="external"/>
     500    <h2>External Link</h2>
     501    <p>The link you have selected is external to any of your currently selected collections. If you still wish to view this link and your browser has access to the Web, you can <a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute>go forward</a> to this page; otherwise use your browsers "back" button to return to the previous document.
     502    </p>
     503  </xsl:template>
     504
    493505</xsl:stylesheet>
    494506
Note: See TracChangeset for help on using the changeset viewer.