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-family: sans-serif;
font-size: 8pt; font-size: 8pt;
font-weight: bold; font-weight: bold;
min-width: 550px; // 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; margin: 2em; //this has to be zero for embed viewing
text-align: center; text-align: center;
} }

View file

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

View file

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

View file

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

View file

@ -7,10 +7,6 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> >
<xsl:template name="video">
</xsl:template>
<xsl:template name="video"> <xsl:template name="video">
<div class="video"> <div class="video">
<xsl:choose> <xsl:choose>
@ -47,7 +43,14 @@
<div> <div>
<a> <a>
<xsl:attribute name="href"> <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:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, '/cortado=false')" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute> </xsl:attribute>
Watch using Browser Video Plugin Watch using Browser Video Plugin
</a> </a>
@ -68,7 +71,14 @@
<div> <div>
<a> <a>
<xsl:attribute name="href"> <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:value-of select="//video/rdf:RDF/cc:Work/dc:identifier" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute> </xsl:attribute>
Watch using Cortado Java Applet Watch using Cortado Java Applet
</a> </a>
@ -77,6 +87,7 @@
</xsl:choose> </xsl:choose>
</div> </div>
<xsl:if test="not(//@embed='true')">
<div class="videodownload"> <div class="videodownload">
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
@ -105,21 +116,21 @@
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="//video/rdf:RDF/cc:License/@rdf:about" /> <xsl:value-of select="//video/rdf:RDF/cc:License/@rdf:about" />
</xsl:attribute> </xsl:attribute>
<!-- <!--
unfinished bizness unfinished bizness
<xsl:value-of select="@rdf:about" /> <xsl:value-of select="@rdf:about" />
<xsl:if test="true()"> <xsl:if test="true()">
<img src="./images/cc/somerights.png" /> <img src="./images/cc/somerights.png" />
</xsl:if> </xsl:if>
--> -->
<xsl:for-each select="//video/rdf:RDF/cc:License/cc:permits"> <xsl:for-each select="//video/rdf:RDF/cc:License/cc:permits">
<!-- <!--
since we are talking about digital media here, distribution actually /is/ reproduction since we are talking about digital media here, distribution actually /is/ reproduction
(also, i was too stupid to figure out how to test for both conditions). (also, i was too stupid to figure out how to test for both conditions).
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/Reproduction'"> <xsl:if test="@rdf:resource = 'http://web.resource.org/cc/Reproduction'">
<img src="./images/cc/cc-share.png" /> <img src="./images/cc/cc-share.png" />
</xsl:if> </xsl:if>
--> -->
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/Distribution'"> <xsl:if test="@rdf:resource = 'http://web.resource.org/cc/Distribution'">
<img src="./images/cc/cc-share.png" /> <img src="./images/cc/cc-share.png" />
</xsl:if> </xsl:if>
@ -134,13 +145,13 @@
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/ShareAlike'"> <xsl:if test="@rdf:resource = 'http://web.resource.org/cc/ShareAlike'">
<img src="./images/cc/cc-sharealike.png" /> <img src="./images/cc/cc-sharealike.png" />
</xsl:if> </xsl:if>
<!-- <!--
source code doesn't make much sense in video context. source code doesn't make much sense in video context.
still, this is preserved for potential future use. still, this is preserved for potential future use.
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/SourceCode'"> <xsl:if test="@rdf:resource = 'http://web.resource.org/cc/SourceCode'">
SOURCE SOURCE
</xsl:if> </xsl:if>
--> -->
</xsl:for-each> </xsl:for-each>
<xsl:for-each select="rdf:RDF/cc:License/cc:prohibits"> <xsl:for-each select="rdf:RDF/cc:License/cc:prohibits">
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/CommercialUse'"> <xsl:if test="@rdf:resource = 'http://web.resource.org/cc/CommercialUse'">
@ -220,7 +231,7 @@
</tr> </tr>
</table> </table>
<table class="referer"> <table class="videometadata">
<xsl:for-each select="//referers/referer"> <xsl:for-each select="//referers/referer">
<tr> <tr>
<td class="leftcell"> <td class="leftcell">
@ -254,7 +265,7 @@
</form> </form>
</div> </div>
</xsl:if> </xsl:if>
</xsl:if>
</xsl:template> </xsl:template>
<xsl:template name="comments"> <xsl:template name="comments">
@ -268,7 +279,7 @@
<div class="comment"> <div class="comment">
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
./user/<xsl:value-of select="@username" /> /user/<xsl:value-of select="@username" />
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="@username" /> <xsl:value-of select="@username" />
</a>: </a>: