[library-web] add quirk to hide section numbers in release notes
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] add quirk to hide section numbers in release notes
- Date: Tue, 5 Apr 2011 12:32:26 +0000 (UTC)
commit c5b36f8a0b764b0f06015b2f78fd738fa7bccaa9
Author: Frédéric Péters <fpeters 0d be>
Date: Tue Apr 5 18:01:25 2011 +0530
add quirk to hide section numbers in release notes
data/overlay.xml.in | 1 +
data/xslt/db2html.xsl | 6 ++++++
src/modtypes/gnomedocbook.py | 4 ++++
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/data/overlay.xml.in b/data/overlay.xml.in
index b7a0d85..bdf646c 100644
--- a/data/overlay.xml.in
+++ b/data/overlay.xml.in
@@ -1199,5 +1199,6 @@
<quirk>languages-in-sidebar</quirk>
<quirk>no-title-and-abstract-from-document</quirk>
<quirk>friends-of-gnome-ruler</quirk>
+ <quirk>hide-section-numbers</quirk>
</quirks>
</overlay>
diff --git a/data/xslt/db2html.xsl b/data/xslt/db2html.xsl
index 0c2a308..b0b635b 100644
--- a/data/xslt/db2html.xsl
+++ b/data/xslt/db2html.xsl
@@ -45,6 +45,7 @@ along with libgo; if not, write to the Free Software Foundation, Inc.,
<xsl:param name="libgo.tarball" select="false()"/>
<xsl:param name="libgo.languages_in_sidebar" select="false()"/>
<xsl:param name="libgo.friends_of_gnome_ruler" select="false()"/>
+<xsl:param name="libgo.hide_section_numbers" select="false()"/>
<xsl:param name="libgo.nightly" select="false()"/>
<!-- Setting parameters for included stylesheets -->
@@ -173,6 +174,11 @@ along with libgo; if not, write to the Free Software Foundation, Inc.,
div.sidebar { top: 230px; }
</style>
</xsl:if>
+ <xsl:if test="$libgo.hide_section_numbers">
+<style type="text/css">
+span.label { display: none; }
+</style>
+ </xsl:if>
</xsl:if>
</xsl:template>
diff --git a/src/modtypes/gnomedocbook.py b/src/modtypes/gnomedocbook.py
index 6423c96..ae12c89 100644
--- a/src/modtypes/gnomedocbook.py
+++ b/src/modtypes/gnomedocbook.py
@@ -258,6 +258,10 @@ class GnomeDocbookModule(DocModule):
cmd.insert(5, '--param')
cmd.insert(6, 'libgo.friends_of_gnome_ruler')
cmd.insert(7, 'true()')
+ if 'hide-section-numbers' in quirks:
+ cmd.insert(5, '--param')
+ cmd.insert(6, 'libgo.hide_section_numbers')
+ cmd.insert(7, 'true()')
logging.debug('executing %s' % ' '.join(cmd))
rc = subprocess.call(cmd)
if rc != 0:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]