summaryrefslogtreecommitdiff
path: root/gentoobrowse-api/service/notifications/xslt/news.xslt
diff options
context:
space:
mode:
Diffstat (limited to 'gentoobrowse-api/service/notifications/xslt/news.xslt')
-rw-r--r--gentoobrowse-api/service/notifications/xslt/news.xslt57
1 files changed, 57 insertions, 0 deletions
diff --git a/gentoobrowse-api/service/notifications/xslt/news.xslt b/gentoobrowse-api/service/notifications/xslt/news.xslt
new file mode 100644
index 0000000..6b2ea29
--- /dev/null
+++ b/gentoobrowse-api/service/notifications/xslt/news.xslt
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://exslt.org/strings" xmlns:project2="http://project2.randomdan.homeip.net" version="1.0" exclude-result-prefixes="project2 fn">
+ <xsl:import href="base.xslt"/>
+ <xsl:output encoding="utf-8" method="html" media-type="text/html" indent="yes"/>
+
+ <xsl:template name="title">Latest news</xsl:template>
+
+ <xsl:template name="content">
+ <xsl:variable name="packages" select="packages/package[packageid = ../../ebuilds/ebuild/packageid]"/>
+ <xsl:variable name="categories" select="categories/category[categoryid = $packages/categoryid]"/>
+ <section>
+ <h2 class="page-header">New versions of tracked packages</h2>
+ <div class="span3 bs-docs-sidebar">
+ <ul class="nav nav-list bs-docs-sidenav">
+ <xsl:for-each select="$categories">
+ <xsl:sort select="name" data-type="text" order="ascending"/>
+ <li>
+ <a>
+ <xsl:attribute name="href">http://gentoobrowse.randomdan.homeip.net/packages/<xsl:value-of select="name" /></xsl:attribute>
+ <i class="icon-chevron-right"></i>
+ <xsl:value-of select="name" />
+ </a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </div>
+ <div class="span9">
+ <xsl:for-each select="$categories">
+ <xsl:sort select="name" data-type="text" order="ascending"/>
+ <xsl:variable name="category" select="." />
+ <xsl:for-each select="$packages[categoryid = current()/categoryid]">
+ <xsl:sort select="name" data-type="text" order="ascending"/>
+ <xsl:variable name="package" select="." />
+ <p>
+ <a>
+ <xsl:attribute name="href">http://gentoobrowse.randomdan.homeip.net/packages/<xsl:value-of select="$category/name" /></xsl:attribute>
+ <xsl:value-of select="$category/name" />
+ </a>
+ /
+ <a>
+ <xsl:attribute name="href">http://gentoobrowse.randomdan.homeip.net/packages/<xsl:value-of select="$category/name" />/<xsl:value-of select="name" /></xsl:attribute>
+ <xsl:value-of select="name" />
+ </a>
+ :
+ <xsl:value-of select="description" />
+ </p>
+ <xsl:for-each select="../../ebuilds/ebuild[packageid = current()/packageid]">
+ <p>
+ v<xsl:value-of select="version" />
+ </p>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </div>
+ </section>
+ </xsl:template>
+</xsl:stylesheet>