Display a warning to the user if they're viewing old versions of the
[exim-website.git] / templates / doc / chapter.xsl
index 6fd6d8c99702c49d60c1ccc2d4c12acb7d5f3bd0..06d9eb982b3240c2b53f933b5baf17124c0556c7 100644 (file)
          <!-- 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)"/>
       </xsl:template>
 
    <!-- Ignore -->
-      <xsl:template match="chapter_id|prev_url|next_url|canonical_url"/>
+      <xsl:template match="chapter_id|prev_url|next_url|canonical_url|current_url"/>
 
 </xsl:stylesheet>