summaryrefslogtreecommitdiff
path: root/gentoobrowse/emails/newpackageversions.xslt
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2014-04-10 13:38:31 +0000
committerrandomdan <randomdan@localhost>2014-04-10 13:38:31 +0000
commite7d95bb26ca0e1a81469b06f19de51856ac66221 (patch)
tree11eab48278a1c1aa417648a641a97aada14e0bac /gentoobrowse/emails/newpackageversions.xslt
parentIndex the correct columns in FTS (diff)
downloadgentoobrowse-e7d95bb26ca0e1a81469b06f19de51856ac66221.tar.bz2
gentoobrowse-e7d95bb26ca0e1a81469b06f19de51856ac66221.tar.xz
gentoobrowse-e7d95bb26ca0e1a81469b06f19de51856ac66221.zip
New email template
Diffstat (limited to 'gentoobrowse/emails/newpackageversions.xslt')
-rw-r--r--gentoobrowse/emails/newpackageversions.xslt54
1 files changed, 30 insertions, 24 deletions
diff --git a/gentoobrowse/emails/newpackageversions.xslt b/gentoobrowse/emails/newpackageversions.xslt
index e5e23be..3eb6c32 100644
--- a/gentoobrowse/emails/newpackageversions.xslt
+++ b/gentoobrowse/emails/newpackageversions.xslt
@@ -1,28 +1,34 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:project2="http://project2.randomdan.homeip.net" exclude-result-prefixes="project2" >
- <xsl:output encoding="utf-8" method="html" media-type="text/html" indent="yes"
- doctype-system="http://www.w3.org/TR/html4/loose.dtd"
- doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" />
- <xsl:template match="/newpackageversions">
- <html>
- <head>
- <title>Welcome to Gentoo Browse</title>
- </head>
- <body>
- <p>All new shiny ebuilds available!</p>
- <ul>
- <xsl:for-each select="newpackageversions/version">
- <li>
+<?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="header">
+ <h2>New versions of packages you're tracking.</h2>
+ </xsl:template>
+
+ <xsl:template name="content">
+ <div class="span9">
+ <xsl:for-each select="newpackageversions/pkgs/value">
+ <div class="container">
+ <xsl:variable name="versions" select="../../version[cname = fn:tokenize(current(),'/')[1] and pname = fn:tokenize(current(),'/')[2]]"/>
+ <h3>
+ <xsl:value-of select="$versions[1]/cname"/> /
<a>
- <xsl:attribute name="href">http://gentoobrowse.randomdan.homeip.net/package/<xsl:value-of select="cname"/>/<xsl:value-of select="pname"/></xsl:attribute>
- <xsl:value-of select="cname"/>/<xsl:value-of select="pname"/>-<xsl:value-of select="version"/>
+ <xsl:attribute name="href">http://gentoobrowse.randomdan.homeip.net/package/<xsl:value-of select="$versions[1]/cname"/>/<xsl:value-of select="$versions[1]/pname"/></xsl:attribute>
+ <xsl:value-of select="$versions[1]/pname"/>
</a>
- </li>
- </xsl:for-each>
- </ul>
- </body>
- </html>
+ </h3>
+ <p>
+ <xsl:value-of select="$versions[1]/description"/>
+ </p>
+ <ul>
+ <xsl:for-each select="$versions">
+ <li><xsl:value-of select="cname"/>/<xsl:value-of select="pname"/>-<xsl:value-of select="version"/></li>
+ </xsl:for-each>
+ </ul>
+ </div>
+ </xsl:for-each>
+ </div>
</xsl:template>
</xsl:stylesheet>
-