From 4e734c570ca6934009296622adabc8f7fca4910c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 15 Apr 2015 21:23:05 +0100 Subject: Extra package image and display it on the page --- gentoobrowse/console/packagemetadata.xml | 3 ++- gentoobrowse/datasources/schema.sql | 3 ++- gentoobrowse/views/package.xml | 2 +- gentoobrowse/xslt/package.xslt | 10 ++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gentoobrowse/console/packagemetadata.xml b/gentoobrowse/console/packagemetadata.xml index f4b1a2f..b66abfe 100644 --- a/gentoobrowse/console/packagemetadata.xml +++ b/gentoobrowse/console/packagemetadata.xml @@ -29,7 +29,8 @@ UPDATE packages SET - summary = , + summary = regexp_replace(, '<<data:image/[^>]+>>', ''), + image = (SELECT regexp_matches(, '<<(data:image/[^>]+)>>'))[1], maintainer = , herd = , metadatadate = diff --git a/gentoobrowse/datasources/schema.sql b/gentoobrowse/datasources/schema.sql index 0d62c3e..d82dae6 100644 --- a/gentoobrowse/datasources/schema.sql +++ b/gentoobrowse/datasources/schema.sql @@ -264,7 +264,8 @@ CREATE TABLE packages ( summary text, maintainer text, herd text, - metadatadate timestamp without time zone + metadatadate timestamp without time zone, + image text ); diff --git a/gentoobrowse/views/package.xml b/gentoobrowse/views/package.xml index bf2c5ab..bb8be37 100644 --- a/gentoobrowse/views/package.xml +++ b/gentoobrowse/views/package.xml @@ -12,7 +12,7 @@ - SELECT p.packageid, p.name AS pkgname, p.description, p.firstseen, c.name AS catname, p.herd, p.summary + SELECT p.packageid, p.name AS pkgname, p.description, p.firstseen, c.name AS catname, p.herd, p.summary, p.image FROM packages p, categories c WHERE p.categoryid = c.categoryid diff --git a/gentoobrowse/xslt/package.xslt b/gentoobrowse/xslt/package.xslt index 2dac0a6..94d67bb 100644 --- a/gentoobrowse/xslt/package.xslt +++ b/gentoobrowse/xslt/package.xslt @@ -112,6 +112,16 @@
+ + + + + + + + + +

-- cgit v1.2.3