Update link for CVE-2019-10149
[exim-website.git] / templates / doc / index.xsl
index d76fa1d12835b3f41a7d4a927fb5d8ca7d073305..751f83fcfc06d6abfd300a032f2ea3f9c503d82b 100644 (file)
@@ -16,7 +16,7 @@
    <xsl:variable name="html.head.append">
 
       <!-- CSS -->
-         <link rel="stylesheet" type="text/css" href="{$docroot}/doc/index.css"/>
+         <link rel="stylesheet" type="text/css" href="{$staticroot}/doc/index.css"/>
 
       <!-- Canonical -->
          <link rel="canonical" href="{/book/canonical_url}"/>
  
    <!-- JavaScript -->
       <xsl:variable name="html.body.append">
-         <script type="text/javascript" src="{$docroot}/doc/index.js"/>
+         <script type="text/javascript" src="{$staticroot}/doc/index.js"/>
       </xsl:variable>
 
    <!-- CONTENT -->
       <xsl:template match="/book">
+         <xsl:if test="current_url">
+            <p id="old_version_warning">
+               <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>
          <div id="info">
             <xsl:apply-templates select="bookinfo"/>
          </div>
          <div id="options" class="hidden">
-            <img src="{$docroot}/doc/plus-12x12.png"  width="12" height="12" class="expand"/>
-            <img src="{$docroot}/doc/minus-12x12.png" width="12" height="12" class="collapse"/>
-            <xsl:text>Expand/Collapse all Chapters</xsl:text>
+            <img src="{$staticroot}/doc/plus-12x12.png"  width="12" height="12" class="expand"/>
+            <img src="{$staticroot}/doc/minus-12x12.png" width="12" height="12" class="collapse"/>
+           <xsl:text>Expand/Collapse all Chapters</xsl:text>
          </div>
          <div id="index">
             <ul id="chapters">
 
          <!-- Calculate the URL to the chapter. Store in $chapter_url -->
             <xsl:variable name="chapter_url">
-               <xsl:choose>
-                  <xsl:when test="position()&lt;10">
-                     <xsl:value-of select="concat(/book/prepend_chapter,'ch',0,position(),'.html')"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                     <xsl:value-of select="concat(/book/prepend_chapter,'ch',position(),'.html')"/>
-                  </xsl:otherwise>
-               </xsl:choose>
+               <xsl:value-of select="concat(/book/prepend_chapter,'ch-',title_uri,'.html')"/>
             </xsl:variable>
 
          <!-- Chapter info -->