diff options
author | randomdan <randomdan@localhost> | 2010-06-10 09:35:14 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-06-10 09:35:14 +0000 |
commit | e7da7ef903e42eb59eca27226f488deee2620682 (patch) | |
tree | cfda1f8e394abc049a0ef0d093229dd2abd88da5 | |
parent | Port of gentoobrowse to project, WIP (diff) | |
download | gentoobrowse-e7da7ef903e42eb59eca27226f488deee2620682.tar.bz2 gentoobrowse-e7da7ef903e42eb59eca27226f488deee2620682.tar.xz gentoobrowse-e7da7ef903e42eb59eca27226f488deee2620682.zip |
Add top level browse page
-rw-r--r-- | gentoobrowse/present/categories.xml | 4 | ||||
-rw-r--r-- | gentoobrowse/views/categories.xml | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gentoobrowse/present/categories.xml b/gentoobrowse/present/categories.xml new file mode 100644 index 0000000..5b886a5 --- /dev/null +++ b/gentoobrowse/present/categories.xml @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<view name="categories" root="gentoo" style="browse.xslt" xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:include href="../views/categories.xml" /> +</view> diff --git a/gentoobrowse/views/categories.xml b/gentoobrowse/views/categories.xml new file mode 100644 index 0000000..ed53caa --- /dev/null +++ b/gentoobrowse/views/categories.xml @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<block xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:include href="../datasources/postgres.xml" /> + <sqlview name="categories" recordname="category" datasource="postgres"> + <sql> + SELECT c.categoryid, MIN(c.name) AS catname, COUNT(*) AS packages + FROM categories c, packages p + WHERE c.categoryid = p.categoryid + GROUP BY c.categoryid + ORDER BY MIN(c.name) + </sql> + </sqlview> +</block> |