[library-web] add a "mail feedback" link on pages



commit c8064f3373ff6f924f52bf38640e1693b902b5ea
Author: Frédéric Péters <fpeters 0d be>
Date:   Mon Jul 28 15:44:59 2014 +0200

    add a "mail feedback" link on pages
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733736

 data/catalog.xml.in     |    2 ++
 data/skin/lgo2010.css   |    8 +++-----
 data/xslt/mal2html.xsl  |   12 ++++++++++++
 src/modtypes/mallard.py |   10 +++++++---
 4 files changed, 24 insertions(+), 8 deletions(-)
---
diff --git a/data/catalog.xml.in b/data/catalog.xml.in
index 33df8e9..0004837 100644
--- a/data/catalog.xml.in
+++ b/data/catalog.xml.in
@@ -105,4 +105,6 @@ find information on tools and methods to work with many GNOME desktops.
   <_msgstr msgid="welcome-to-gnome-devcenter">Welcome to GNOME. Getting started is easy - install our dev 
tools and take a look at a tutorial.</_msgstr>
   <_msgstr msgid="tarball-location">This documentation is generated from the following tarball:</_msgstr>
   <_msgstr msgid="search">Search</_msgstr>
+  <_msgstr msgid="doc-feedback-intro">Got a comment? Spotted an error? Found the instructions 
unclear?</_msgstr>
+  <_msgstr msgid="doc-feedback-link">Send feedback about this page.</_msgstr>
 </msgcat>
diff --git a/data/skin/lgo2010.css b/data/skin/lgo2010.css
index a6deceb..cf2d4e9 100644
--- a/data/skin/lgo2010.css
+++ b/data/skin/lgo2010.css
@@ -507,8 +507,6 @@ div#frontpage-indexes > div input {
        width: 100%;
 }
 
-/* open doc links in new tabs
- * but this CSS3 doesn't seem to be supported in any major browser */
-.doc-link {
-       target-new: tab ! important;
-}
\ No newline at end of file
+p.doc-feedback {
+       margin-top: 2em;
+}
diff --git a/data/xslt/mal2html.xsl b/data/xslt/mal2html.xsl
index fb7f6ea..8013f52 100644
--- a/data/xslt/mal2html.xsl
+++ b/data/xslt/mal2html.xsl
@@ -165,6 +165,18 @@ $(document).ready(function () {
       <div class="content about">
        <div>
         <xsl:apply-templates mode="html.footer.mode" select="$node"/>
+        <p class="action_box doc-feedback">
+          <xsl:call-template name="gettext"><xsl:with-param name="lang"
+            select="$libgo.lang"/><xsl:with-param name="msgid"
+            select="'doc-feedback-intro'"/></xsl:call-template>
+           <xsl:text> </xsl:text>
+           <a class="button">
+             <xsl:attribute name="href">mailto:docs gnome org?subject=Feedback on <xsl:value-of 
select="$libgo.path"/></xsl:attribute>
+          <xsl:call-template name="gettext"><xsl:with-param name="lang"
+            select="$libgo.lang"/><xsl:with-param name="msgid"
+            select="'doc-feedback-link'"/></xsl:call-template>
+           </a>
+        </p>
        </div>
       </div>
 
diff --git a/src/modtypes/mallard.py b/src/modtypes/mallard.py
index 3cbadf7..751b76b 100644
--- a/src/modtypes/mallard.py
+++ b/src/modtypes/mallard.py
@@ -300,8 +300,9 @@ class MallardModule(DocModule):
 
         web_output_dir = app.get_module_web_output_dir(self, versioned=True)
         quirks = app.overlay.get_quirks(self)
+        web_public_dir = web_output_dir[len(app.config.output_dir):]
 
-        logging.info('generating doc in %s' % web_output_dir[len(app.config.output_dir):])
+        logging.info('generating doc in %s' % web_public_dir)
         if not os.path.exists(web_output_dir):
             os.makedirs(web_output_dir)
 
@@ -443,14 +444,17 @@ class MallardModule(DocModule):
                         copied_files.append(dst)
 
             for xml_file in xml_files:
-
-                # format docbook into html files
+                # format mallard into html files
                 cmd = ['xsltproc',
                         '--nonet', '--xinclude',
                         '--stringparam', 'libgo.mallard.html.basedir', web_output_dir,
                         '--stringparam', 'mal.cache.file', temporary.name,
                         '--stringparam', 'libgo.lang', lang,
                         '--stringparam', 'libgo.channel', self.channel,
+                        '--stringparam', 'libgo.module', self.modulename,
+                        '--stringparam', 'libgo.version', self.one_dot_version,
+                        '--stringparam', 'libgo.path',
+                            '%s%s' % (web_public_dir, os.path.basename(xml_file)),
                         self.mal2html_xsl_file, xml_file]
 
                 if self.nightly:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]