fixed search page xslt

git-svn-id: http://yolanda.mister-muffin.de/svn@53 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2007-10-12 11:18:13 +00:00
parent 9e26059341
commit 4c034f4d1a
3 changed files with 12 additions and 4 deletions

View file

@ -20,5 +20,8 @@ $session_name = 'sid';
$XMLDecl = '<?xml version="1.0" encoding="UTF-8" ?><?xml-stylesheet type="text/xsl" href="./xsl/xhtml.xsl" ?>'; $XMLDecl = '<?xml version="1.0" encoding="UTF-8" ?><?xml-stylesheet type="text/xsl" href="./xsl/xhtml.xsl" ?>';
$locale = "en-US"; $locale = "en-US";
$stylesheet = "./style/gnutube.css"; $stylesheet = "./style/gnutube.css";
$xmlns_dc = "http://purl.org/dc/elements/1.1/";
$xmlns_cc = "http://web.resource.org/cc/";
$xmlns_rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
1; 1;

View file

@ -9,10 +9,15 @@ $session = new CGI::Session;
#check if query is set #check if query is set
if($query->param('query')) if($query->param('query'))
{ {
$page = XMLin("$gnutube_root/search.xml", ForceArray => 1, KeyAttr => {} ); %page = ();
#if a username is associated with session id, username is nonempty #if a username is associated with session id, username is nonempty
$page->{username} = get_username_from_sid($session->id); $page->{'username'} = get_username_from_sid($session->id);
$page->{'locale'} = $locale;
$page->{'stylesheet'} = $stylesheet;
$page->{'xmlns:dc'} = $xmlns_dc;
$page->{'xmlns:cc'} = $xmlns_cc;
$page->{'xmlns:rdf'} = $xmlns_rdf;
$page->{results}->{query} = decode_utf8($query->param('query')); $page->{results}->{query} = decode_utf8($query->param('query'));

View file

@ -147,7 +147,7 @@
</xsl:template> </xsl:template>
<xsl:template match="searchbar"> <xsl:template name="searchbar">
<div class="logo-small-top"> <div class="logo-small-top">
<img src="./images/logo-small-top.png" alt="GNUtube logo top (160x25)" /> <img src="./images/logo-small-top.png" alt="GNUtube logo top (160x25)" />
@ -198,7 +198,7 @@
</xsl:template> </xsl:template>
<xsl:template match="results"> <xsl:template match="results">
<xsl:call-template name="searchbar"/>
<div> <div>
THE SEARCH FOR THE SEARCH FOR
"<xsl:value-of select="@query" />" "<xsl:value-of select="@query" />"