summaryrefslogtreecommitdiff
path: root/gentoobrowse/xslt/base.xslt
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2012-03-13 20:17:26 +0000
committerrandomdan <randomdan@localhost>2012-03-13 20:17:26 +0000
commit9019eda559a27b9c486fdc8a08a6bca511b764e6 (patch)
tree2bbe629fd146253100acfe155d41b8415244fb36 /gentoobrowse/xslt/base.xslt
parentFix xsl paths for new output (diff)
downloadgentoobrowse-9019eda559a27b9c486fdc8a08a6bca511b764e6.tar.bz2
gentoobrowse-9019eda559a27b9c486fdc8a08a6bca511b764e6.tar.xz
gentoobrowse-9019eda559a27b9c486fdc8a08a6bca511b764e6.zip
Minor fixes and add pages for browsing by USE flag
Diffstat (limited to 'gentoobrowse/xslt/base.xslt')
-rw-r--r--gentoobrowse/xslt/base.xslt22
1 files changed, 20 insertions, 2 deletions
diff --git a/gentoobrowse/xslt/base.xslt b/gentoobrowse/xslt/base.xslt
index e1c721f..88bea15 100644
--- a/gentoobrowse/xslt/base.xslt
+++ b/gentoobrowse/xslt/base.xslt
@@ -29,10 +29,10 @@
<li><a href="/categories">Browse</a></li>
<li><a href="/popular">Popular</a></li>
<li><a href="JavaScript: void(0);" onclick="toggleForm('#search');" rel="nofollow">Search</a></li>
- <xsl:if test="count(/gentoo/project2:session/var[@name='loggedInUserID']) = 0">
+ <xsl:if test="count(/gentoo/project2:session/loggedInUserID) = 0">
<li><a href="JavaScript: void(0);" onclick="toggleForm('#login');" rel="nofollow">Login</a></li>
</xsl:if>
- <xsl:if test="count(/gentoo/project2:session/var[@name='loggedInUserID']) &gt; 0">
+ <xsl:if test="count(/gentoo/project2:session/loggedInUserID) &gt; 0">
<li><a href="/accountHome" rel="nofollow">My Account</a></li>
</xsl:if>
</ul>
@@ -91,4 +91,22 @@
</a> - <xsl:value-of select="description" />
</li>
</xsl:template>
+ <xsl:template match="package" mode="withuse">
+ <li>
+ <a>
+ <xsl:attribute name="href">/package/<xsl:value-of select="catname" />/<xsl:value-of select="pkgname" /></xsl:attribute>
+ <xsl:attribute name="title"><xsl:value-of select="description" /></xsl:attribute>
+ <xsl:value-of select="catname" />/<xsl:value-of select="pkgname" />
+ </a> - <xsl:value-of select="description" />
+ <xsl:if test="count(/gentoo/local/use[packageid = current()/packageid]) &gt; 0">
+ <ul>
+ <xsl:for-each select="/gentoo/local/use[packageid = current()/packageid]">
+ <li>
+ <xsl:value-of select="description" />
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </li>
+ </xsl:template>
</xsl:stylesheet>