library-web r442 - in trunk: . data/xslt src



Author: fpeters
Date: Tue May  6 08:47:46 2008
New Revision: 442
URL: http://svn.gnome.org/viewvc/library-web?rev=442&view=rev

Log:
* data/xslt/indexes.xsl, src/lgo.py: don't link to single-page versions
when they do not exist.



Modified:
   trunk/ChangeLog
   trunk/data/xslt/indexes.xsl
   trunk/src/lgo.py

Modified: trunk/data/xslt/indexes.xsl
==============================================================================
--- trunk/data/xslt/indexes.xsl	(original)
+++ trunk/data/xslt/indexes.xsl	Tue May  6 08:47:46 2008
@@ -269,6 +269,7 @@
 	      </xsl:for-each>
 	      </ul>
 
+	      <xsl:if test="@single_page_alternative = 'true'">
 	      <h4><xsl:call-template name="gettext"><xsl:with-param name="lang"
 		      select="$lang"/><xsl:with-param name="msgid"
 		      select="'allinonepage'"/></xsl:call-template></h4>
@@ -284,6 +285,7 @@
 		</li>
 	      </xsl:for-each>
 	      </ul>
+	      </xsl:if>
 	    </xsl:if>
 
 	  </div>

Modified: trunk/src/lgo.py
==============================================================================
--- trunk/src/lgo.py	(original)
+++ trunk/src/lgo.py	Tue May  6 08:47:46 2008
@@ -112,6 +112,7 @@
     toc_id = None
     subsection = None
     weight = 0.5
+    single_page_alternative = False
 
     title = None # indexed on language, most recent version
     abstract = None # indexed on language, most recent version
@@ -213,6 +214,10 @@
                 tarball.text = self.tarballs[k]
                 tarball.set('version', k)
 
+        if self.single_page_alternative:
+            doc.set('single_page_alternative', 'true')
+
+
         assert_elementtree_node(doc)
 
 
@@ -357,7 +362,7 @@
 
     related_xsl_files = None
     mtime_xslt_files = 0
- 
+
     def __init__(self, tar, tarinfo, makefile_am):
         self.dirname = os.path.dirname(tarinfo.name)
         if makefile_am:
@@ -801,6 +806,8 @@
                 doc_module, self.one_dot_version)
         
         quirks = app.overlay.get_quirks(self)
+        if not 'flat-rendering' in quirks:
+            doc.single_page_alternative = True
 
         logging.info('generating doc in %s' % web_output_dir[len(app.config.output_dir):])
         if not os.path.exists(web_output_dir):



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