summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-09-12 17:10:58 +0000
committerrandomdan <randomdan@localhost>2010-09-12 17:10:58 +0000
commit60b9f52e6bf406701911e1f5bb533fea2bb17718 (patch)
tree9760ad5f6d0c9419d7f238296525793b67e82348
parentImport the masks (diff)
downloadgentoobrowse-60b9f52e6bf406701911e1f5bb533fea2bb17718.tar.bz2
gentoobrowse-60b9f52e6bf406701911e1f5bb533fea2bb17718.tar.xz
gentoobrowse-60b9f52e6bf406701911e1f5bb533fea2bb17718.zip
Show mask status
Fix import of slot and license
-rw-r--r--gentoobrowse/browse.xslt25
-rw-r--r--gentoobrowse/console/packageimport.xml2
-rw-r--r--gentoobrowse/style.css4
-rw-r--r--gentoobrowse/views/package.xml24
4 files changed, 55 insertions, 0 deletions
diff --git a/gentoobrowse/browse.xslt b/gentoobrowse/browse.xslt
index 6f1bacb..6720a54 100644
--- a/gentoobrowse/browse.xslt
+++ b/gentoobrowse/browse.xslt
@@ -46,6 +46,13 @@
(<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" />)
+ <xsl:if test="count(../../maskstatus/mask[ebuildid=current()/ebuildid]) &gt; 0">
+ <span class="masked">(Masked
+ <xsl:for-each select="../../maskstatus/mask[ebuildid=current()/ebuildid]">
+ <xsl:value-of select="setno" />
+ </xsl:for-each>)
+ </span>
+ </xsl:if>
<ul>
<li>
<xsl:for-each select="../../versionArchs/arch[ebuildid=current()/ebuildid]">
@@ -122,12 +129,16 @@
<xsl:if test="count(/gentoo/summary/package/packageBugs/bug) &gt; 0">
<a class="tabhandle" href="javascript:showTab('bugs');">Open bugs</a>
</xsl:if>
+ <xsl:if test="count(/gentoo/summary/package/maskdetails/mask) &gt; 0">
+ <a class="tabhandle" href="javascript:showTab('masks');">Masks</a>
+ </xsl:if>
</div>
<div class="tabbox" id="tabcontainer">
<!-- content -->
<xsl:apply-templates select="versions" />
<xsl:apply-templates select="deps" />
<xsl:apply-templates select="packageBugs" />
+ <xsl:apply-templates select="maskdetails" />
<div style="clear; both" />
</div>
</xsl:template>
@@ -172,4 +183,18 @@
</ul>
</xsl:if>
</xsl:template>
+
+ <!-- Package mask details -->
+ <xsl:template match="/gentoo/summary/package/maskdetails">
+ <xsl:if test="count(/gentoo/summary/package/maskdetails/mask) &gt; 0">
+ <ol class="tabhidden" id="masks">
+ <xsl:for-each select="mask">
+ <li>
+ <xsl:value-of select="person" /> (<i>Added: </i><xsl:value-of select="dateadded" />)
+ <ul><li><xsl:value-of select="message" /></li></ul>
+ </li>
+ </xsl:for-each>
+ </ol>
+ </xsl:if>
+ </xsl:template>
</xsl:stylesheet>
diff --git a/gentoobrowse/console/packageimport.xml b/gentoobrowse/console/packageimport.xml
index f417f9a..ddc3ff1 100644
--- a/gentoobrowse/console/packageimport.xml
+++ b/gentoobrowse/console/packageimport.xml
@@ -50,6 +50,8 @@
<column>packageid</column>
<column>version</column>
<column>versioninst</column>
+ <column>slot</column>
+ <column>license</column>
</columns>
</project2:sqlmerge>
diff --git a/gentoobrowse/style.css b/gentoobrowse/style.css
index c6aba8f..8aa6394 100644
--- a/gentoobrowse/style.css
+++ b/gentoobrowse/style.css
@@ -49,6 +49,10 @@ p {
padding: 5px 20px;
white-space: nowrap;
}
+.masked {
+ color: red;
+ font-weight: bold;
+}
.urls {
float: right;
margin: 8px 30px;
diff --git a/gentoobrowse/views/package.xml b/gentoobrowse/views/package.xml
index a4ba735..4cb0a0d 100644
--- a/gentoobrowse/views/package.xml
+++ b/gentoobrowse/views/package.xml
@@ -99,5 +99,29 @@
<param bind="0" value="^packageid" />
</parameters>
</project2:sqlview>
+ <project2:sqlview name="maskstatus" recordname="mask" datasource="postgres">
+ <sql>
+ SELECT em.ebuildid, RANK() OVER(ORDER BY em.setno) AS setno
+ FROM ebuild_masks em, ebuilds e
+ WHERE em.ebuildid = e.ebuildid
+ AND e.packageid = ?
+ </sql>
+ <parameters>
+ <param bind="0" value="^packageid" />
+ </parameters>
+ </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
+ 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)
+ </sql>
+ <parameters>
+ <param bind="0" value="^packageid" />
+ </parameters>
+ </project2:sqlview>
</project2:sqlview>
</block>