added embedded mode - css has to be fixed accordingly

git-svn-id: http://yolanda.mister-muffin.de/svn@177 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2007-11-07 06:55:02 +00:00
parent 384fcb6467
commit 23f30e8259
5 changed files with 300 additions and 283 deletions

View file

@ -8,8 +8,8 @@ body
font-family: sans-serif;
font-size: 8pt;
font-weight: bold;
min-width: 550px;
margin: 2em;
// min-width: 550px; //what is this for? we do not know which font size the user will choose so something in pixel is bullshit
margin: 2em; //this has to be zero for embed viewing
text-align: center;
}

View file

@ -1,7 +1,6 @@
#!/usr/bin/perl -w
use DBI;
use Data::Dumper::Simple;
$database = 'yolanda';
$dbhost = 'localhost';

View file

@ -71,6 +71,8 @@ elsif($query->url_param('title') or $query->url_param('id'))
}
elsif($rowcount == 1)
{
$page->{'embed'} = $query->param('embed') eq 'true' ? "true" : "false";
#if there was a single result, display the video
my ($id, $title, $description, $publisher, $timestamp, $creator, $subject,
$contributor, $source, $language, $coverage, $rights, $license,

View file

@ -78,6 +78,7 @@
<body>
<xsl:if test="not(//@embed='true')">
<xsl:choose>
<xsl:when test="string-length(//@username)=0">
<div class="header1">
@ -164,6 +165,8 @@
<xsl:call-template name="message"/>
</xsl:if>
</xsl:if>
<xsl:choose>
<xsl:when test="//frontpage">
<xsl:call-template name="frontpage"/>
@ -188,6 +191,7 @@
</xsl:when>
</xsl:choose>
<xsl:if test="not(//@embed='true')">
<div class="footer">
<a>
<xsl:attribute name="href">
@ -210,6 +214,7 @@
<xsl:value-of select="$locale_strings[@id='source_code']" />
</a>
</div>
</xsl:if>
</body>

View file

@ -7,10 +7,6 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
<xsl:template name="video">
</xsl:template>
<xsl:template name="video">
<div class="video">
<xsl:choose>
@ -47,7 +43,14 @@
<div>
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="//@embed='true'">
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, '/cortado=false&amp;embed=true')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, '/cortado=false')" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Watch using Browser Video Plugin
</a>
@ -68,7 +71,14 @@
<div>
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="//@embed='true'">
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, '/embed=true')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:identifier" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Watch using Cortado Java Applet
</a>
@ -77,6 +87,7 @@
</xsl:choose>
</div>
<xsl:if test="not(//@embed='true')">
<div class="videodownload">
<a>
<xsl:attribute name="href">
@ -220,7 +231,7 @@
</tr>
</table>
<table class="referer">
<table class="videometadata">
<xsl:for-each select="//referers/referer">
<tr>
<td class="leftcell">
@ -254,7 +265,7 @@
</form>
</div>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template name="comments">
@ -268,7 +279,7 @@
<div class="comment">
<a>
<xsl:attribute name="href">
./user/<xsl:value-of select="@username" />
/user/<xsl:value-of select="@username" />
</xsl:attribute>
<xsl:value-of select="@username" />
</a>: