summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse/browse.xslt127
-rw-r--r--gentoobrowse/form.xslt2
-rw-r--r--gentoobrowse/style.css45
-rw-r--r--gentoobrowse/views/package.xml5
4 files changed, 74 insertions, 105 deletions
diff --git a/gentoobrowse/browse.xslt b/gentoobrowse/browse.xslt
index 2382013..8d3643d 100644
--- a/gentoobrowse/browse.xslt
+++ b/gentoobrowse/browse.xslt
@@ -12,28 +12,20 @@
</xsl:template>
<xsl:template match="/gentoo/categories">
<h2>Package groups</h2>
- <table class="grps">
- <tr>
- <th>Category</th>
- <th>Packages</th>
- </tr>
+ <ul>
<xsl:apply-templates select="/gentoo/categories/category" />
- </table>
+ </ul>
</xsl:template>
<xsl:template match="/gentoo/categories/category">
- <tr>
- <td>
- <a>
- <xsl:attribute name="href">
- /category/<xsl:value-of select="catname" />
- </xsl:attribute>
- <xsl:value-of select="catname" />
- </a>
- </td>
- <td>
- <xsl:value-of select="packages" />
- </td>
- </tr>
+ <li>
+ <a>
+ <xsl:attribute name="href">
+ /category/<xsl:value-of select="catname" />
+ </xsl:attribute>
+ <xsl:value-of select="catname" />
+ </a>
+ (<xsl:value-of select="packages" />)
+ </li>
</xsl:template>
<xsl:template match="/gentoo/packages">
<h2>Packages</h2>
@@ -43,33 +35,34 @@
</xsl:template>
<xsl:template match="/gentoo/summary/package/versions">
<div class="tabvisible" id="versions">
- <table class="versions">
+ <ul>
<xsl:apply-templates select="version" />
- </table>
+ </ul>
</div>
</xsl:template>
<xsl:template match="/gentoo/summary/package/versions/version">
- <tr class="row1">
- <td class="ver">
- v<xsl:value-of select="version" />
- </td>
- <td class="archs">
- <xsl:apply-templates select="../../versionArchs/arch[ebuildid=current()/ebuildid]">
- <xsl:sort select="arch" />
- </xsl:apply-templates>
- </td>
- </tr>
- <tr class="row2">
- <td colspan="2" class="use">
- Use flags:
- <xsl:apply-templates select="../../versionUses/use[ebuildid=current()/ebuildid]">
- <xsl:sort select="use" />
- </xsl:apply-templates>
- </td>
- </tr>
+ <li>
+ <span class="ver">v<xsl:value-of select="version" /></span> (<xsl:value-of select="moddate" />)
+ <ul>
+ <li>
+ <xsl:for-each select="../../versionArchs/arch[ebuildid=current()/ebuildid]">
+ <xsl:sort select="arch" />
+ <xsl:value-of select="arch" />
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </li>
+ <li>
+ <xsl:for-each select="../../versionUses/use[ebuildid=current()/ebuildid]">
+ <xsl:sort select="use" />
+ <xsl:value-of select="use" />
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </li>
+ </ul>
+ </li>
</xsl:template>
<xsl:template match="/gentoo/summary/package">
- <script language="javascript">
+ <script language="javascript" type="text/javascript">
function showTab(name)
{
var children = document.getElementById('tabcontainer').childNodes;
@@ -117,7 +110,7 @@
<p>
<xsl:value-of select="description" />
</p>
- <div class="tabbox" id="tabcontainer">
+ <div class="tabstrip">
<!-- handles -->
<a class="tabhandle" href="javascript:showTab('versions');">Versions</a>
<xsl:if test="count(/gentoo/summary/package/deps/package) &gt; 0">
@@ -126,6 +119,8 @@
<xsl:if test="count(/gentoo/summary/package/packageBugs/bug) &gt; 0">
<a class="tabhandle" href="javascript:showTab('bugs');">Open bugs</a>
</xsl:if>
+ </div>
+ <div class="tabbox" id="tabcontainer">
<!-- content -->
<xsl:apply-templates select="versions" />
<xsl:apply-templates select="deps" />
@@ -137,48 +132,34 @@
<!-- Package URLs -->
<xsl:template match="/gentoo/summary/package/packageUrls">
<div class="urls">
- <xsl:apply-templates match="url" />
- </div>
- </xsl:template>
- <xsl:template match="/gentoo/summary/package/packageUrls/url">
- <a target="_blank">
- <xsl:attribute name="href">
+ <xsl:for-each select="url">
+ <a target="_blank">
+ <xsl:attribute name="href">
+ <xsl:value-of select="url" />
+ </xsl:attribute>
<xsl:value-of select="url" />
- </xsl:attribute>
- <xsl:value-of select="url" />
- </a>
- <br />
+ </a>
+ <br />
+ </xsl:for-each>
+ </div>
</xsl:template>
<!-- Package bugs -->
<xsl:template match="/gentoo/summary/package/packageBugs">
<xsl:if test="count(/gentoo/summary/package/packageBugs/bug) &gt; 0">
<ul class="tabhidden" id="bugs">
- <xsl:apply-templates match="bug" />
+ <xsl:for-each select="bug">
+ <li>
+ <a target="_blank">
+ <xsl:attribute name="href">http://bugs.gentoo.org/<xsl:value-of select="bugid" /></xsl:attribute>
+ <xsl:value-of select="summary" />
+ </a>
+ (<xsl:value-of select="bugid" />)
+ </li>
+ </xsl:for-each>
</ul>
</xsl:if>
</xsl:template>
- <xsl:template match="/gentoo/summary/package/packageBugs/bug">
- <li>
- <a target="_blank">
- <xsl:attribute name="href">http://bugs.gentoo.org/<xsl:value-of select="bugid" /></xsl:attribute>
- <xsl:value-of select="summary" />
- </a>
- (<xsl:value-of select="bugid" />)
- </li>
- </xsl:template>
-
- <!-- Version use flags -->
- <xsl:template match="/gentoo/summary/package/versionUses/use">
- <xsl:value-of select="use" />
- <xsl:text> </xsl:text>
- </xsl:template>
-
- <!-- Version archs -->
- <xsl:template match="/gentoo/summary/package/versionArchs/arch">
- <xsl:value-of select="arch" />
- <xsl:text> </xsl:text>
- </xsl:template>
<!-- Package dependencies -->
<xsl:template match="/gentoo/summary/package/deps">
diff --git a/gentoobrowse/form.xslt b/gentoobrowse/form.xslt
index 7e55b0f..cfcbed4 100644
--- a/gentoobrowse/form.xslt
+++ b/gentoobrowse/form.xslt
@@ -22,7 +22,7 @@
<xsl:attribute name="value">
<xsl:value-of select="dyn:evaluate(@xslvalue)" />
</xsl:attribute>
- <xsl:attribute name="autocomplete"><xsl:value-of select="@auto" /></xsl:attribute>
+ <!--xsl:attribute name="autocomplete"><xsl:value-of select="@auto" /></xsl:attribute -->
</input>
</td>
</tr>
diff --git a/gentoobrowse/style.css b/gentoobrowse/style.css
index 2f3bc2e..c6aba8f 100644
--- a/gentoobrowse/style.css
+++ b/gentoobrowse/style.css
@@ -44,40 +44,17 @@ p {
margin: 0;
}
-.versions {
- border-collapse: collapse;
- margin: 10px;
-}
-.versions td {
- border: 1px solid gray;
-}
-.versions .row1 td {
- border-top: 2px solid black;
-}
-.versions .row2 td {
- border-bottom: 2px solid black;
-}
-.versions .ver {
+.ver {
font-size: large;
padding: 5px 20px;
white-space: nowrap;
}
-.versions .use, .versions .archs {
- padding: 10px 5px;
-}
.urls {
float: right;
margin: 8px 30px;
text-align: center;
}
-table.grps {
- border-collapse: collapse;
-}
-table.grps td {
- border: 1px solid black;
- padding: 5px 20px;
-}
div.trademark, div.poweredby {
text-align: center;
color: gray;
@@ -110,13 +87,16 @@ form.tracker {
font-weight: bold;
}
+.tabstrip {
+}
.tabbox {
- border: 1px solid grey;
- background: #eeeeee;
- margin: 10px;
+ margin: 0px;
}
-
.tabvisible, .tabhidden {
+ padding: 10px 20px;
+ margin: 0px;
+ border: 1px solid grey;
+ background: #eeeeee;
}
.tabvisible {
display: block;
@@ -126,6 +106,13 @@ form.tracker {
}
.tabhandle {
display: span;
- padding: 0 40px;
+ text-decoration: none;
+ padding: 0 30px;
font-size: 14px;
+ border: 1px solid grey;
+ margin: 0 4px;
+ -moz-border-radius-topleft: 10px;
+ -moz-border-radius-topright: 10px;
+ border-radius-topleft: 10px;
+ border-radius-topright: 10px;
}
diff --git a/gentoobrowse/views/package.xml b/gentoobrowse/views/package.xml
index ba5041b..1ed38b3 100644
--- a/gentoobrowse/views/package.xml
+++ b/gentoobrowse/views/package.xml
@@ -28,9 +28,10 @@
</project2:sqlview>
<project2:sqlview name="versions" recordname="version" datasource="postgres">
<sql>
- SELECT e.ebuildid, e.version
- FROM ebuilds e
+ SELECT e.ebuildid, e.version, f.moddate
+ FROM ebuilds e, files f
WHERE e.packageid = ?
+ AND e.ebuildid = f.fileid
ORDER BY versioninst desc
</sql>
<parameters>