From c4acac31f7c7d41180338525e800ee78b89dfbd3 Mon Sep 17 00:00:00 2001 From: randomdan Date: Thu, 25 Nov 2010 14:09:17 +0000 Subject: Add most popular tracked packages page --- gentoobrowse/base.xslt | 1 + gentoobrowse/popular.xslt | 28 ++++++++++++++++++++++++++++ gentoobrowse/present/popular.xml | 4 ++++ gentoobrowse/views/popular.xml | 16 ++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 gentoobrowse/popular.xslt create mode 100644 gentoobrowse/present/popular.xml create mode 100644 gentoobrowse/views/popular.xml diff --git a/gentoobrowse/base.xslt b/gentoobrowse/base.xslt index 6653113..0a7efdc 100644 --- a/gentoobrowse/base.xslt +++ b/gentoobrowse/base.xslt @@ -28,6 +28,7 @@
Home | Browse | + Popular | Search | Login diff --git a/gentoobrowse/popular.xslt b/gentoobrowse/popular.xslt new file mode 100644 index 0000000..c65b6fa --- /dev/null +++ b/gentoobrowse/popular.xslt @@ -0,0 +1,28 @@ + + + + + + Popular Package List - Gentoo Browse + + List of Gentoo packages track by users + + + + , + + + + + + + +

Popular Packages

+
    + +
+
+
diff --git a/gentoobrowse/present/popular.xml b/gentoobrowse/present/popular.xml new file mode 100644 index 0000000..8f89d1a --- /dev/null +++ b/gentoobrowse/present/popular.xml @@ -0,0 +1,4 @@ + + + + diff --git a/gentoobrowse/views/popular.xml b/gentoobrowse/views/popular.xml new file mode 100644 index 0000000..873805a --- /dev/null +++ b/gentoobrowse/views/popular.xml @@ -0,0 +1,16 @@ + + + + + + SELECT p.packageid, MIN(c.name) AS catname, MIN(p.name) AS pkgname, MIN(p.description) AS description + FROM user_packages up, packages p, categories c + WHERE up.packageid = p.packageid + AND p.categoryid = c.categoryid + GROUP BY p.packageid + ORDER BY COUNT(*), MIN(c.name), MIN(p.name) + LIMIT 50 + + + -- cgit v1.2.3