Merge pull request #2 from mikecardwell/master
[exim-website.git] / templates / doc / chapter.xsl
index 6fd6d8c99702c49d60c1ccc2d4c12acb7d5f3bd0..17d772ad7a16cfa287fc448675ec22bb972f7290 100644 (file)
@@ -16,7 +16,7 @@
    <xsl:variable name="html.head.append">
 
       <!-- CSS -->
-         <link rel="stylesheet" type="text/css" href="{$docroot}/doc/chapter.css"/>
+         <link rel="stylesheet" type="text/css" href="{$staticroot}/doc/chapter.css"/>
 
       <!-- Canonical -->
          <link rel="canonical" href="{/chapter/canonical_url}"/>
  
    <!-- JavaScript -->
       <xsl:variable name="html.body.append">
-         <script type="text/javascript" src="{$docroot}/doc/chapter.js"/>
+         <script type="text/javascript" src="{$staticroot}/doc/chapter.js"/>
       </xsl:variable>
 
    <!-- Table of Contents -->
       <xsl:variable name="html.body.outer.append">
          <div id="toc">
             <ul class="hidden"/>
-            <img src="../../../../doc/contents.png" width="16" height="155"/>
+            <img src="{$staticroot}/doc/contents.png" width="16" height="155"/>
          </div>
       </xsl:variable>
 
 
          <!-- Navigation -->
          <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
-        <xsl:if test="next_url">
-            <a class="next_page" href="{next_url}"><![CDATA[next->]]></a>
+         <xsl:if test="next_url">
+            <a class="next_page"  href="{next_url}"><![CDATA[next->]]></a>
          </xsl:if>
 
          <!-- Chapter Wrapper -->
          <div id="chapter" class="chapter{@class}">
 
+            <xsl:if test="current_url">
+               <p id="old_version_warning">
+                  <span class="closebar"><a href="#" title="Close">X</a></span>
+                  <strong>WARNING:</strong>
+                  <xsl:text> This documentation is for an old version of Exim (</xsl:text>
+                  <a href="{current_url}">latest</a>
+                  <xsl:text>)</xsl:text>
+               </p>
+            </xsl:if>
+
             <!-- Chapter Title -->
             <h2 id="{@id}" class="{@class}">
-               <xsl:value-of select="concat('Chapter ',chapter_id,' - ',title)"/>
+               <a href="{this_url}">
+                  <xsl:value-of select="concat('Chapter ',chapter_id,' - ',title)"/>
+               </a>
             </h2>
 
             <!-- Chapter Info -->
 
          <!-- Navigation -->
             <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
-            <a class="next_page"     href="{next_url}"><![CDATA[next->]]></a>
+            <a class="toc_page"      href="{toc_url}"><![CDATA[Table of Contents]]></a>
+            <xsl:if test="next_url">
+               <a class="next_page"  href="{next_url}"><![CDATA[next->]]></a>
+            </xsl:if>
 
       </xsl:template>
 
       </xsl:template>
 
    <!-- Ignore -->
-      <xsl:template match="chapter_id|prev_url|next_url|canonical_url"/>
+      <xsl:template match="chapter_id|this_url|prev_url|next_url|toc_url|canonical_url|current_url|title_uri|old_versions"/>
 
 </xsl:stylesheet>