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



Author: fpeters
Date: Wed Oct 15 17:05:39 2008
New Revision: 518
URL: http://svn.gnome.org/viewvc/library-web?rev=518&view=rev

Log:
* data/xslt/indexes.xsl, src/lgo.py: put "nightly" version last; and
mark stable version in bold.



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	Wed Oct 15 17:05:39 2008
@@ -303,9 +303,19 @@
 	      <ul class="versions">
 	      <xsl:for-each select="versions/version">
 	        <li>
-		 <a href="{ href}/" lang="{ lang}"><xsl:apply-templates
+		 <xsl:choose>
+		   <xsl:when test="@keyword = 'stable'"><strong>
+		    <a href="{ href}/" lang="{ lang}"><xsl:apply-templates
 		 	select="." mode="version-name"><xsl:with-param name="lang" select="$lang"/>
 			</xsl:apply-templates></a>
+		    </strong>
+		   </xsl:when>
+		   <xsl:otherwise>
+		    <a href="{ href}/" lang="{ lang}"><xsl:apply-templates
+		 	select="." mode="version-name"><xsl:with-param name="lang" select="$lang"/>
+			</xsl:apply-templates></a>
+		   </xsl:otherwise>
+		 </xsl:choose>
 		 <xsl:if test="@keyword = 'unstable'">
 		    (<xsl:call-template name="gettext"><xsl:with-param name="lang"
 		      select="$lang"/><xsl:with-param name="msgid"
@@ -322,9 +332,19 @@
 	      <ul class="versions">
 	      <xsl:for-each select="versions/version">
 	        <li>
-		 <a href="{ href}/{$modulename}.html" lang="{ lang}"><xsl:apply-templates
+		 <xsl:choose>
+		   <xsl:when test="@keyword = 'stable'"><strong>
+		     <a href="{ href}/{$modulename}.html" lang="{ lang}"><xsl:apply-templates
+		 	select="." mode="version-name"><xsl:with-param name="lang" select="$lang"/>
+			</xsl:apply-templates></a>
+		    </strong>
+		   </xsl:when>
+		   <xsl:otherwise>
+		     <a href="{ href}/{$modulename}.html" lang="{ lang}"><xsl:apply-templates
 		 	select="." mode="version-name"><xsl:with-param name="lang" select="$lang"/>
 			</xsl:apply-templates></a>
+		   </xsl:otherwise>
+		 </xsl:choose>
 		 <xsl:if test="@keyword = 'unstable'">
 		    (<xsl:call-template name="gettext"><xsl:with-param name="lang"
 		      select="$lang"/><xsl:with-param name="msgid"

Modified: trunk/src/lgo.py
==============================================================================
--- trunk/src/lgo.py	(original)
+++ trunk/src/lgo.py	Wed Oct 15 17:05:39 2008
@@ -73,9 +73,9 @@
     if x == 'nightly' and y == 'nightly':
         return 0
     elif x == 'nightly':
-        return -1
-    elif y == 'nightly':
         return 1
+    elif y == 'nightly':
+        return -1
     try:
         return cmp([int(j) for j in x.split('.')], [int(k) for k in y.split('.')])
     except ValueError:



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