summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse/present/index.xml8
-rw-r--r--gentoobrowse/xslt/home.xslt11
2 files changed, 9 insertions, 10 deletions
diff --git a/gentoobrowse/present/index.xml b/gentoobrowse/present/index.xml
index f040d4b..5f5408b 100644
--- a/gentoobrowse/present/index.xml
+++ b/gentoobrowse/present/index.xml
@@ -4,14 +4,12 @@
<xi:include href="../views/newebuilds.xml" />
<xi:include href="../views/webcommon.xml" />
<project2:view name="newebuilds" source="newebuilds" rootname="newebuilds" recordname="ebuild" filter="syncCount">
+ <project2:distinct name="syncs">
+ <value source="parent" depth="1" name="sync" />
+ </project2:distinct>
<parameters>
<count value="3" />
<userID source="session" name="loggedInUserID"><default value="0" type="int" /></userID>
</parameters>
</project2:view>
- <project2:view name="syncs" source="syncs" rootname="syncs" recordname="sync" filter="syncCount">
- <parameters>
- <count value="3" />
- </parameters>
- </project2:view>
</view>
diff --git a/gentoobrowse/xslt/home.xslt b/gentoobrowse/xslt/home.xslt
index b40b44b..3ec24bb 100644
--- a/gentoobrowse/xslt/home.xslt
+++ b/gentoobrowse/xslt/home.xslt
@@ -12,17 +12,18 @@
</xsl:template>
<xsl:template match="/gentoo/newebuilds">
<h2>Newest ebuilds</h2>
- <xsl:for-each select="/gentoo/syncs/sync">
+ <xsl:for-each select="syncs/value">
+ <xsl:sort select="position()" data-type="number" order="descending"/>
<section class="newebuilds">
<h3>
<time>
- <xsl:attribute name="datetime"><xsl:value-of select="synctime" /></xsl:attribute>
- <span class="syncdate"><xsl:value-of select="synctime/@date" /></span>
- <span class="synctime"><xsl:value-of select="synctime/@time" /></span>
+ <xsl:attribute name="datetime"><xsl:value-of select="current()" /></xsl:attribute>
+ <span class="syncdate"><xsl:value-of select="current()/@date" /></span>
+ <span class="synctime"><xsl:value-of select="current()/@time" /></span>
</time>
</h3>
<ul>
- <xsl:apply-templates select="/gentoo/newebuilds/ebuild[sync = current()/synctime]" />
+ <xsl:apply-templates select="/gentoo/newebuilds/ebuild[sync = current()]" />
</ul>
</section>
</xsl:for-each>