From 9019eda559a27b9c486fdc8a08a6bca511b764e6 Mon Sep 17 00:00:00 2001 From: randomdan Date: Tue, 13 Mar 2012 20:17:26 +0000 Subject: Minor fixes and add pages for browsing by USE flag --- gentoobrowse/BingSiteAuth.xml | 4 ++++ gentoobrowse/console/use.local.xml | 4 ++++ gentoobrowse/present/package.xml | 6 ++++++ gentoobrowse/present/use.xml | 23 ++++++++++++++++++++ gentoobrowse/views/search.xml | 13 +++++++++++ gentoobrowse/views/use.xml | 44 ++++++++++++++++++++++++++++++++++++++ gentoobrowse/xslt/base.xslt | 22 +++++++++++++++++-- gentoobrowse/xslt/package.xslt | 26 ++++++++++++++++++++-- gentoobrowse/xslt/use.xslt | 25 ++++++++++++++++++++++ 9 files changed, 163 insertions(+), 4 deletions(-) create mode 100644 gentoobrowse/BingSiteAuth.xml create mode 100644 gentoobrowse/present/use.xml create mode 100644 gentoobrowse/views/use.xml create mode 100644 gentoobrowse/xslt/use.xslt diff --git a/gentoobrowse/BingSiteAuth.xml b/gentoobrowse/BingSiteAuth.xml new file mode 100644 index 0000000..55f6af2 --- /dev/null +++ b/gentoobrowse/BingSiteAuth.xml @@ -0,0 +1,4 @@ + + + 73B32731E60AB08699031ED48022DB7A + \ No newline at end of file diff --git a/gentoobrowse/console/use.local.xml b/gentoobrowse/console/use.local.xml index 456c5cc..e35e3ba 100644 --- a/gentoobrowse/console/use.local.xml +++ b/gentoobrowse/console/use.local.xml @@ -19,6 +19,8 @@ + + @@ -38,6 +40,8 @@ + + diff --git a/gentoobrowse/present/package.xml b/gentoobrowse/present/package.xml index 62d4226..db09c42 100644 --- a/gentoobrowse/present/package.xml +++ b/gentoobrowse/present/package.xml @@ -2,6 +2,7 @@ + @@ -14,6 +15,11 @@ + + + + + diff --git a/gentoobrowse/present/use.xml b/gentoobrowse/present/use.xml new file mode 100644 index 0000000..b1ae7b1 --- /dev/null +++ b/gentoobrowse/present/use.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/gentoobrowse/views/search.xml b/gentoobrowse/views/search.xml index b3a5ed2..db08d33 100644 --- a/gentoobrowse/views/search.xml +++ b/gentoobrowse/views/search.xml @@ -30,6 +30,19 @@ + + + SELECT DISTINCT p.packageid, c.name AS catname, p.name AS pkgname, description + FROM ebuild_uses eu, ebuilds e, packages p, categories c + WHERE e.ebuildid = eu.ebuildid + AND e.packageid = p.packageid + AND p.categoryid = c.categoryid + + AND eu.use = + + ORDER BY c.name, p.name + + SELECT c.name as catname, p.name as pkgname, description diff --git a/gentoobrowse/views/use.xml b/gentoobrowse/views/use.xml new file mode 100644 index 0000000..f0938bd --- /dev/null +++ b/gentoobrowse/views/use.xml @@ -0,0 +1,44 @@ + + + + + SELECT LTRIM(p.use, '+') AS use, COALESCE(MIN(l.description), MIN(g.description)) AS description + FROM (SELECT e.packageid, u.use + FROM ebuilds e, ebuild_uses u + WHERE e.ebuildid = u.ebuildid + + AND e.packageid = + ) AS p + LEFT OUTER JOIN use_global g ON LTRIM(p.use, '+') = g.use + LEFT OUTER JOIN use_local l ON LTRIM(p.use, '+') = l.use + AND (l.packageid = p.packageid OR l.packageid IS NULL) + AND (l.description IS NOT NULL OR g.description IS NOT NULL) + GROUP BY LTRIM(p.use, '+') + ORDER BY LTRIM(p.use, '+') + + + + + SELECT use, description + FROM use_global + + WHERE use = + + + + + + SELECT packageid, use, description + FROM use_local + + WHERE use = + ORDER BY packageid + + + WHERE packageid = + ORDER BY use + + + + 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 @@
  • Browse
  • Popular
  • Search
  • - +
  • Login
  • - +
  • My Account
  • @@ -91,4 +91,22 @@ - + +
  • + + /package// + + / + - + +
      + +
    • + +
    • +
      +
    +
    +
  • +
    diff --git a/gentoobrowse/xslt/package.xslt b/gentoobrowse/xslt/package.xslt index 8547ff3..efba87d 100644 --- a/gentoobrowse/xslt/package.xslt +++ b/gentoobrowse/xslt/package.xslt @@ -13,7 +13,7 @@ $("section#pkgdetails").tabs(); }) - +