diff options
author | randomdan <randomdan@localhost> | 2010-09-21 19:51:33 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-09-21 19:51:33 +0000 |
commit | b07c9d1dc9816bb324ced6f350e73e73b21249c9 (patch) | |
tree | cd4105fbfb2ce33eadd6b6e3798674807d63e65f | |
parent | Tidy up the bug list (diff) | |
download | gentoobrowse-b07c9d1dc9816bb324ced6f350e73e73b21249c9.tar.bz2 gentoobrowse-b07c9d1dc9816bb324ced6f350e73e73b21249c9.tar.xz gentoobrowse-b07c9d1dc9816bb324ced6f350e73e73b21249c9.zip |
Handle null fields
Use null to hide null license details
Fix mask counter
Include change log
-rw-r--r-- | gentoobrowse/browse.xslt | 21 | ||||
-rw-r--r-- | gentoobrowse/views/package.xml | 20 |
2 files changed, 36 insertions, 5 deletions
diff --git a/gentoobrowse/browse.xslt b/gentoobrowse/browse.xslt index 7a3cf29..8bbf2c0 100644 --- a/gentoobrowse/browse.xslt +++ b/gentoobrowse/browse.xslt @@ -44,8 +44,10 @@ <li> <span class="ver">v<xsl:value-of select="version" /></span> (<i>Modified :</i> <xsl:value-of select="moddate" /><xsl:text> </xsl:text> - <i>Slot :</i> <xsl:value-of select="slot" /><xsl:text> </xsl:text> - <i>License :</i> <xsl:value-of select="license" />) + <i>Slot :</i> <xsl:value-of select="slot" /> + <xsl:if test="license"><xsl:text> </xsl:text> + <i>License :</i> <xsl:value-of select="license" /> + </xsl:if>) <xsl:if test="count(../../maskstatus/mask[ebuildid=current()/ebuildid]) > 0"> <span class="masked">(Masked <xsl:for-each select="../../maskstatus/mask[ebuildid=current()/ebuildid]"> @@ -132,6 +134,9 @@ <xsl:if test="count(/gentoo/summary/package/maskdetails/mask) > 0"> <a class="tabhandle" href="javascript:showTab('masks');">Masks</a> </xsl:if> + <xsl:if test="count(/gentoo/summary/package/changelog/line) > 0"> + <a class="tabhandle" href="javascript:showTab('changelog');">Change log</a> + </xsl:if> </div> <div class="tabbox" id="tabcontainer"> <!-- content --> @@ -139,6 +144,7 @@ <xsl:apply-templates select="deps" /> <xsl:apply-templates select="packageBugs" /> <xsl:apply-templates select="maskdetails" /> + <xsl:apply-templates select="changelog" /> <div style="clear; both" /> </div> </xsl:template> @@ -175,6 +181,17 @@ </xsl:if> </xsl:template> + <!-- Change log --> + <xsl:template match="/gentoo/summary/package/changelog"> + <xsl:if test="count(/gentoo/summary/package/changelog/line) > 0"> + <div class="tabhidden" id="changelog"> + <xsl:for-each select="line"> + <p><xsl:value-of select="content" /></p> + </xsl:for-each> + </div> + </xsl:if> + </xsl:template> + <!-- Package dependencies --> <xsl:template match="/gentoo/summary/package/deps"> <xsl:if test="count(/gentoo/summary/package/deps/package) > 0"> diff --git a/gentoobrowse/views/package.xml b/gentoobrowse/views/package.xml index 4cb0a0d..a7fc724 100644 --- a/gentoobrowse/views/package.xml +++ b/gentoobrowse/views/package.xml @@ -101,7 +101,7 @@ </project2:sqlview> <project2:sqlview name="maskstatus" recordname="mask" datasource="postgres"> <sql> - SELECT em.ebuildid, RANK() OVER(ORDER BY em.setno) AS setno + SELECT em.ebuildid, DENSE_RANK() OVER(ORDER BY em.setno) AS setno FROM ebuild_masks em, ebuilds e WHERE em.ebuildid = e.ebuildid AND e.packageid = ? @@ -112,12 +112,26 @@ </project2:sqlview> <project2:sqlview name="maskdetails" recordname="mask" datasource="postgres"> <sql> - SELECT DISTINCT RANK() OVER(ORDER BY em.setno), ms.person, ms.message, ms.dateadded + SELECT DISTINCT DENSE_RANK() OVER(ORDER BY em.setno), ms.person, ms.message, ms.dateadded FROM ebuild_masks em, ebuilds e, masksets ms WHERE em.ebuildid = e.ebuildid AND ms.setno = em.setno AND e.packageid = ? - ORDER BY RANK() OVER(ORDER BY em.setno) + ORDER BY DENSE_RANK() OVER(ORDER BY em.setno) + </sql> + <parameters> + <param bind="0" value="^packageid" /> + </parameters> + </project2:sqlview> + <project2:sqlview name="changelog" recordname="line" datasource="postgres"> + <sql> + SELECT line, content + FROM files f, filecache fc, packages p, categories c + WHERE f.fileid = fc.fileid + AND p.categoryid = c.categoryid + AND f.filename = c.name || '/' || p.name || '/ChangeLog' + AND p.packageid = ? + ORDER BY line </sql> <parameters> <param bind="0" value="^packageid" /> |