[Libreoffice-commits] help.git: help3xsl/online_transform.xsl

Olivier Hallot olivier.hallot at libreoffice.org
Mon Jan 29 17:11:03 UTC 2018


 help3xsl/online_transform.xsl |   19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 64187c4328623fca6c00d2f5c9f659211ee18883
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date:   Mon Jan 29 15:00:51 2018 -0200

    New Help: allow product version = "latest"
    
    To enhance version migration, the most recent Help will be
    named "latest" in the URL. Explicit last version X.Y will be
    symbolic link to 'latest'. e.g. '6.0' -> 'latest'
    
    *This will allow search engine to always index the same 'latest' URL
    *External links always land in 'latest' pages.
    
    Change-Id: I5ffa1d268f71b7ebe75d5d90c62bcd6304507602
    Reviewed-on: https://gerrit.libreoffice.org/48848
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
    Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index acdc6febb..00d8d69e6 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -116,7 +116,13 @@
             <xsl:with-param name="str" select="$filename"/>
         </xsl:call-template>
     </xsl:variable>
-<html  lang="{$lang}">
+    <xsl:variable name="logoprodversion">
+        <xsl:choose>
+            <xsl:when test="$productversion='latest'"><xsl:value-of select="''"/></xsl:when>
+            <xsl:otherwise><xsl:value-of select="$productversion"/></xsl:otherwise>
+        </xsl:choose>
+    </xsl:variable>
+<html lang="{$lang}">
     <head>
         <base href="{$install}"/>
         <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
@@ -144,9 +150,14 @@
             <div class="logo-container">
                 <a class="logo" href="https://helponline.libreoffice.org/">
                     <div class="symbol"></div>
-                    <p><xsl:call-template name="brand"><xsl:with-param name="string">
-                        <xsl:call-template name="getLogo"><xsl:with-param name="lang" select="$lang"/><xsl:with-param name="version" select="$productversion"/></xsl:call-template>
-                    </xsl:with-param></xsl:call-template></p>
+                    <p><xsl:call-template name="brand">
+                        <xsl:with-param name="string">
+                            <xsl:call-template name="getLogo">
+                                <xsl:with-param name="lang" select="$lang"/>
+                                <xsl:with-param name="version" select="$logoprodversion"/>
+                            </xsl:call-template>
+                        </xsl:with-param>
+                    </xsl:call-template></p>
                 </a>
             </div>
         </header>


More information about the Libreoffice-commits mailing list