diff options
Diffstat (limited to 'gentoobrowse/emails/newpackageversions.xslt')
-rw-r--r-- | gentoobrowse/emails/newpackageversions.xslt | 54 |
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> - |