Changeset 14535

Show
Ignore:
Timestamp:
17.09.2007 15:48:40 (12 years ago)
Author:
qq6
Message:

added an "externalPage" template

Files:
1 modified

Legend:

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

    r13996 r14535  
    7777  <xsl:template match="document"> 
    7878   <xsl:param name="collName"/> 
    79    
     79   <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable> 
     80   <xsl:if test="$external != ''"> 
     81      <xsl:call-template name="externalPage"> 
     82    <xsl:with-param name="external" select="$external"/> 
     83      </xsl:call-template> 
     84    </xsl:if> 
     85 
     86    <xsl:if test="$external = ''"> 
    8087   <xsl:if test="$bookswitch = 'flashxml'"> 
    8188            <xsl:call-template name="xmldocumentContentPeeling"> 
     
    140147                </xsl:text> 
    141148            </script> 
    142         </xsl:if>     
     149        </xsl:if>   
     150      </xsl:if> 
    143151 </xsl:template> 
    144152 
     
    570578    </xsl:if>  
    571579  </xsl:template> 
     580 
     581  <xsl:template name="externalPage"> 
     582     <xsl:param name="external"/> 
     583    <h2>External Link</h2> 
     584    <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. 
     585    </p> 
     586  </xsl:template> 
     587 
    572588</xsl:stylesheet> 
    573589