]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
XSL changes needed to add comments to 2.2 branch
authorDaniel Gruno <humbedooh@apache.org>
Fri, 13 Jul 2012 04:41:42 +0000 (04:41 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Fri, 13 Jul 2012 04:41:42 +0000 (04:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1361042 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/xsl/common.xsl
docs/manual/style/xsl/manualpage.xsl
docs/manual/style/xsl/synopsis.xsl

index 7d29489fe2cb8f762946f422a91f0d1edcce3232..3cd8f6f6f9362202376dcb7873c1b801d1779610 100644 (file)
@@ -20,6 +20,8 @@
 <!DOCTYPE xsl:stylesheet [
     <!ENTITY nbsp SYSTEM "util/nbsp.xml">
     <!ENTITY lf SYSTEM "util/lf.xml">
+    <!ENTITY % HTTPD-VERSION SYSTEM "../version.ent">
+    %HTTPD-VERSION;
 ]>
 <xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            rel="stylesheet"
            href="{$path}/style/css/manual-print.css"/>
     <link href="{$path}/style/css/prettify.css" type="text/css" rel="stylesheet" />&lf;
-    <script type="text/javascript" src="{$path}/style/scripts/prettify.js">&lf; </script> &lf;
+    <script type="text/javascript" src="{$path}/style/scripts/prettify.js">&lf;</script>&lf;
     <!-- chm files do not need a favicon -->
     <xsl:if test="not($is-chm or $is-zip)">&lf;
         <link rel="shortcut icon" href="{$path}/images/favicon.ico" />
 <xsl:call-template name="langavail">
     <xsl:with-param name="position" select="'bottom'" />
 </xsl:call-template>
-
+<xsl:choose>
+<xsl:when test="not($is-chm or $is-zip or $metafile/basename = 'index')">
+<div class="top"><a href="#page-header"><img alt="top" src="{$path}/images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="comments_section" id="comments_section"><xsl:value-of select="$message[@id='comments']" /></a></h2>
+<div class="warning"><strong>Notice:</strong><br/>This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>&lf;
+<script type="text/javascript">
+<xsl:text disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!--
+var comments_shortname = 'httpd';
+var comments_identifier = 'http://httpd.apache.org/docs/]]></xsl:text>&httpd.docs;<xsl:value-of select="concat($metafile/path, $metafile/basename, '.html')" disable-output-escaping="yes" /><xsl:text disable-output-escaping="yes"><![CDATA[';
+(function(w, d) {
+    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
+        d.write('<div id="comments_thread"><\/div>');
+        var s = d.createElement('script');
+        s.type = 'text/javascript';
+        s.async = true;
+        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
+        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
+    }
+    else { 
+        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
+    }
+})(window, document);
+//--><!]]]]>></xsl:text></script>
+</div>
+</xsl:when>
+</xsl:choose>
 <div id="footer">&lf;
     <p class="apache">
         <xsl:text>Copyright 2012 The Apache Software Foundation.</xsl:text><br />
 </div> <!-- /footer -->
 
 <script type="text/javascript">
-<xsl:text disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!--]]></xsl:text><![CDATA[
-if (typeof(prettyPrint) !== undefined) {
+<xsl:text disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!--
+if (typeof(prettyPrint) !== 'undefined') {
     prettyPrint();
 }
-]]><xsl:text disable-output-escaping="yes"><![CDATA[//--><!]]]]>></xsl:text></script>
+//--><!]]]]>></xsl:text></script>
 </xsl:template>
 <!-- /bottom -->
 
@@ -537,7 +565,7 @@ if (typeof(prettyPrint) !== undefined) {
 
     <xsl:text> | </xsl:text>
 
-    <a href="{$path}/faq/{$index-file}">
+    <a href="http://wiki.apache.org/httpd/FAQ">
         <xsl:value-of select="$message[@id='faq']" />
     </a>
 
index 30cc9d100e71537380b8d6e687e8de86330cdbc4..555e76975871af3ea4f789611d6f1476296bd444 100644 (file)
                         </xsl:for-each>
                         </ul>
                     </xsl:if>
+                    <xsl:if test="not($is-chm or $is-zip or $metafile/basename = 'index')">
+                    <ul class="seealso">
+                        <li><a href="#comments_section"><xsl:value-of
+                                select="$message[@id='comments']" /></a>
+                        </li>
+                    </ul>
+                    </xsl:if>
                 </div>&lf; <!-- /#quickview -->
             </xsl:if>
 
index 7e43411a0d6215e73915c3882ddd2bbe55770f18..0a8e4f137236ca28b1885ae2e7e325f2f4a54059 100644 (file)
                     <td>
                         <xsl:variable name="status" select="translate(
                             status, $uppercase, $lowercase)"/>
-                        <xsl:value-of select="$message[@id=$status]"/>
+                        <xsl:choose>
+                        <xsl:when test="status = 'External' and status/@href">
+                            <a href="{status/@href}">
+                                <xsl:value-of select="$message[@id=$status]"/>
+                            </a>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of
+                                select="$message[@id=$status]"/>
+                        </xsl:otherwise>
+                        </xsl:choose>
                     </td>
                 </tr>
 
                         </xsl:for-each>
                         </ul>
                     </xsl:if>
+                    <xsl:if test="not($is-chm or $is-zip or $metafile/basename = 'index')">
+                    <ul class="seealso">
+                        <li><a href="#comments_section"><xsl:value-of
+                                select="$message[@id='comments']" /></a>
+                        </li>
+                    </ul>
+                    </xsl:if>
                 </div> <!-- /#quickview -->
             </xsl:if>&lf; <!-- have sidebar -->