diff options
Diffstat (limited to 'gentoobrowse/browse.xslt')
-rw-r--r-- | gentoobrowse/browse.xslt | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/gentoobrowse/browse.xslt b/gentoobrowse/browse.xslt index 26d5e25..db3f4f6 100644 --- a/gentoobrowse/browse.xslt +++ b/gentoobrowse/browse.xslt @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8" ?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<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:import href="base.xslt" /> <xsl:output encoding="utf-8" method="html" media-type="text/html" indent="yes" doctype-system="http://www.w3.org/TR/html4/loose.dtd" @@ -66,6 +67,30 @@ </tr> </xsl:template> <xsl:template match="/gentoo/summary/package"> + <xsl:if test="count(/gentoo/project2:session/project2:var[@name='loggedInUserID']) != 0"> + <xsl:if test="count(tracks/track) > 0"> + <form method="post" class="tracker"> + <xsl:attribute name="action">/untrack/<xsl:value-of select="catname" />/<xsl:value-of select="pkgname" /></xsl:attribute> + <input type="hidden" name="packageid"> + <xsl:attribute name="value"> + <xsl:value-of select="/gentoo/summary/package/packageid" /> + </xsl:attribute> + </input> + <input type="submit" value="Untrack" /> + </form> + </xsl:if> + <xsl:if test="count(tracks/track) = 0"> + <form method="post" class="tracker"> + <xsl:attribute name="action">/track/<xsl:value-of select="catname" />/<xsl:value-of select="pkgname" /></xsl:attribute> + <input type="hidden" name="packageid"> + <xsl:attribute name="value"> + <xsl:value-of select="/gentoo/summary/package/packageid" /> + </xsl:attribute> + </input> + <input type="submit" value="Track" /> + </form> + </xsl:if> + </xsl:if> <h2> <a> <xsl:attribute name="href"> |