created the basic upload form
git-svn-id: http://yolanda.mister-muffin.de/svn@168 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
3f57bd7c26
commit
e2ef952f70
5 changed files with 293 additions and 104 deletions
|
@ -92,6 +92,7 @@
|
|||
<!-- upload page -->
|
||||
<str id="file">file</str>
|
||||
<str id="button_next_page">next page</str>
|
||||
<str id="button_previous_page">previous page</str>
|
||||
<str id="button_upload">upload</str>
|
||||
<str id="instruction_file">Specify the file you want to upload.</str>
|
||||
<str id="instruction_title">State the title of the video.</str>
|
||||
|
@ -101,9 +102,15 @@
|
|||
<str id="instruction_source">Specify the source, preferably by URL.</str>
|
||||
<str id="instruction_language">State the language of the video.</str>
|
||||
<str id="instruction_coverage">Specify the time and location covered.</str>
|
||||
<str id="this_is_page_1">This is page 1 of 3.</str>
|
||||
<str id="this_is_page_2">This is page 2 of 3.</str>
|
||||
<str id="this_is_page_2">This is page 3 of 3.</str>
|
||||
<str id="this_is_page_1">This is page 1 of 6.</str>
|
||||
<str id="this_is_page_2">This is page 2 of 6.</str>
|
||||
<str id="this_is_page_3">This is page 3 of 6.</str>
|
||||
<str id="this_is_page_4">This is page 4 of 6.</str>
|
||||
<str id="this_is_page_5">This is page 5 of 6.</str>
|
||||
<str id="this_is_page_6">This is page 6 of 6.</str>
|
||||
<str id="button_page_1">Page 1</str>
|
||||
<str id="button_page_3">Page 3</str>
|
||||
<str id="button_page_4">Page 4</str>
|
||||
|
||||
<!-- video page -->
|
||||
<str id="download_video">download video</str>
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<str id="page_login-openid">/login.pl?action=openid</str>
|
||||
<str id="page_logout">/login.pl?action=logout</str>
|
||||
<str id="page_authors">INSERT LINK TO YOLANDA AUTHORS HERE</str>
|
||||
<str id="page_license">http://gplv3.fsf.org/agplv3-dd1.html</str>
|
||||
<str id="page_source-code">http://mister-muffin.de/proj/browser</str>
|
||||
<str id="page_license">http://gplv3.fsf.org/agplv3-dd2.html</str>
|
||||
<str id="page_source-code">http://mister-muffin.de/proj/browser/trunk</str>
|
||||
<str id="page_register">/register.pl</str>
|
||||
<str id="page_results">search.pl?query=</str>
|
||||
<str id="page_upload">/upload.pl</str>
|
||||
|
|
|
@ -13,7 +13,30 @@ my $session = new CGI::Session;
|
|||
|
||||
if($userinfo->{'username'})
|
||||
{
|
||||
if($query->param('2'))
|
||||
{
|
||||
$page->{uploadform} = {'page' => '2'};
|
||||
}
|
||||
elsif($query->param('3'))
|
||||
{
|
||||
$page->{uploadform} = {'page' => '3'};
|
||||
}
|
||||
elsif($query->param('4'))
|
||||
{
|
||||
$page->{uploadform} = {'page' => '4'};
|
||||
}
|
||||
elsif($query->param('5'))
|
||||
{
|
||||
$page->{uploadform} = {'page' => '5'};
|
||||
}
|
||||
elsif($query->param('6'))
|
||||
{
|
||||
$page->{uploadform} = {'page' => '6'};
|
||||
}
|
||||
else
|
||||
{
|
||||
$page->{uploadform} = {'page' => '1'};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -430,24 +430,27 @@
|
|||
<xsl:choose>
|
||||
|
||||
<xsl:when test="//uploadform/@page=1">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<h2>Basic Description</h2>
|
||||
<p>These entries describe the very nature of your upload. All fields are required to be filled appropriately.</p>
|
||||
<form method="post">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="$site_strings[@id='page_uploader']" />
|
||||
<xsl:value-of select="$site_strings[@id='page_upload']" />
|
||||
</xsl:attribute>
|
||||
<fieldset>
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_file']" />
|
||||
<br />
|
||||
<input name="file" type="file" size="13" />
|
||||
<br />
|
||||
<input type="hidden" name="page" value="2" />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_title']" />
|
||||
<br />
|
||||
<input name="DC.Title" type="text" size="30" />
|
||||
<br />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_subject']" />
|
||||
<br />
|
||||
<input name="DC.Subject" type="text" size="30" />
|
||||
<br />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_description']" />
|
||||
<br />
|
||||
<input name="DC.Description" type="text" size="30" />
|
||||
<textarea name="DC.Description" cols="50" rows="5"></textarea>
|
||||
<br /><br />
|
||||
<input type="submit" name="page2" >
|
||||
<input type="submit" name="2">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_next_page']" />
|
||||
</xsl:attribute>
|
||||
|
@ -461,32 +464,20 @@
|
|||
</xsl:when>
|
||||
|
||||
<xsl:when test="//uploadform/@page=2">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<h2>Uploads that match your description</h2>
|
||||
<p>If the attributes you just entered is imilar to those of already uploaded videos you will see the results below.</p>
|
||||
<p>Please check if your video is not among them and then click next to proceed.</p>
|
||||
<form method="post">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="$site_strings[@id='page_uploader']" />
|
||||
<xsl:value-of select="$site_strings[@id='page_upload']" />
|
||||
</xsl:attribute>
|
||||
<fieldset>
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_creator']" />
|
||||
<br />
|
||||
<input name="DC.Creator" type="text" size="30" />
|
||||
<br />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_subject']" />
|
||||
<br />
|
||||
<input name="DC.Subject" type="text" size="30" />
|
||||
<br />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_source']" />
|
||||
<br />
|
||||
<input name="DC.Source" type="text" size="30" />
|
||||
<br />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_language']" />
|
||||
<br />
|
||||
<input name="DC.Language" type="text" size="30" />
|
||||
<br />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_coverage']" />
|
||||
<br />
|
||||
<input name="DC.Coverage" type="text" size="30" />
|
||||
<br />
|
||||
<input type="submit" name="page2" >
|
||||
<input type="submit" name="1">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_previous_page']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<input type="submit" name="3">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_next_page']" />
|
||||
</xsl:attribute>
|
||||
|
@ -497,6 +488,169 @@
|
|||
</span>
|
||||
</fieldset>
|
||||
</form>
|
||||
<xsl:call-template name="innerresults"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="//uploadform/@page=3">
|
||||
<h2>Additional information</h2>
|
||||
<p>The following fields are optional but recommended.</p>
|
||||
<form method="post">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="$site_strings[@id='page_upload']" />
|
||||
</xsl:attribute>
|
||||
<fieldset>
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_creator']" />
|
||||
<br />
|
||||
<input type="radio" name="creator" value="user" />myself
|
||||
<br />
|
||||
<input type="radio" name="creator" value="other" />other:
|
||||
<br />
|
||||
<input name="DC.Creator" type="text" size="30" />
|
||||
<br />
|
||||
<br />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_source']" />
|
||||
<br />
|
||||
<input name="DC.Source" type="text" size="30" />
|
||||
<br />
|
||||
<br />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_language']" />
|
||||
<br />
|
||||
<select name="DC.Language">
|
||||
<option>English</option>
|
||||
<option>German</option>
|
||||
</select>
|
||||
<br />
|
||||
<br />
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_coverage']" />
|
||||
<br />
|
||||
<input name="DC.Coverage" type="text" size="30" />
|
||||
<br />
|
||||
<br />
|
||||
<input type="submit" name="2">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_previous_page']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<input type="submit" name="4">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_next_page']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<br />
|
||||
<span class="protip">
|
||||
<xsl:value-of select="$locale_strings[@id='this_is_page_3']" />
|
||||
</span>
|
||||
</fieldset>
|
||||
</form>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="//uploadform/@page=4">
|
||||
<h2>Licensing</h2>
|
||||
<p>If you are the copyright holder feel free to use creative commons to license your work. If not, select the original license of your video.</p>
|
||||
<form method="post">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="$site_strings[@id='page_upload']" />
|
||||
</xsl:attribute>
|
||||
<fieldset>
|
||||
<input type="radio" name="license" checked="checked" />none
|
||||
<br />
|
||||
<input type="radio" name="license" />proprietary
|
||||
<br />
|
||||
<input type="radio" name="license" />public domain
|
||||
<br />
|
||||
<input type="radio" name="license" />creative commons
|
||||
<br />
|
||||
<select>
|
||||
<option>cc-by</option>
|
||||
<option>cc-by-sa</option>
|
||||
<option>cc-by-sa-nc</option>
|
||||
<option>cc-by-nc</option>
|
||||
<option>cc-by-nd</option>
|
||||
<option>cc-by-nd-nc</option>
|
||||
</select>
|
||||
<br />
|
||||
<br />
|
||||
<input type="submit" name="3">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_previous_page']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<input type="submit" name="5">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_next_page']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<br />
|
||||
<span class="protip">
|
||||
<xsl:value-of select="$locale_strings[@id='this_is_page_4']" />
|
||||
</span>
|
||||
</fieldset>
|
||||
</form>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="//uploadform/@page=5">
|
||||
<h2>Summary</h2>
|
||||
<p>Please check everything for correctness and edit if neccessary. If Everything is okay proceed below by uploading your video.</p>
|
||||
<form method="post">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="$site_strings[@id='page_upload']" />
|
||||
</xsl:attribute>
|
||||
<fieldset>
|
||||
title:
|
||||
<br />
|
||||
subject:
|
||||
<br />
|
||||
description
|
||||
<br />
|
||||
<input type="submit" name="1">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_page_1']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<br />
|
||||
creator:
|
||||
<br />
|
||||
source:
|
||||
<br />
|
||||
language:
|
||||
<br />
|
||||
coverage:
|
||||
<br />
|
||||
<input type="submit" name="3">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_page_3']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<br />
|
||||
license:
|
||||
<br />
|
||||
<input type="submit" name="4">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_page_4']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="$site_strings[@id='page_uploader']" />
|
||||
</xsl:attribute>
|
||||
<fieldset>
|
||||
<xsl:value-of select="$locale_strings[@id='instruction_file']" />
|
||||
<br />
|
||||
<input name="file" type="file" size="13" />
|
||||
<br />
|
||||
<input type="submit">
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_upload']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<br />
|
||||
<span class="protip">
|
||||
<xsl:value-of select="$locale_strings[@id='this_is_page_5']" />
|
||||
</span>
|
||||
</fieldset>
|
||||
</form>
|
||||
</xsl:when>
|
||||
|
||||
</xsl:choose>
|
||||
|
|
|
@ -6,6 +6,76 @@
|
|||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
>
|
||||
|
||||
<xsl:template name="innerresults">
|
||||
<table class="results" align="center">
|
||||
<xsl:for-each select="//results/result">
|
||||
<tr class="result">
|
||||
<td>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
|
||||
</xsl:attribute>
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="@thumbnail" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="alt">
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</a>
|
||||
</td>
|
||||
<td><h2>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
|
||||
</a>
|
||||
</h2>
|
||||
<table class="videometadata">
|
||||
<tr>
|
||||
<td class="leftcell">
|
||||
<xsl:value-of select="$locale_strings[@id='duration']" />:
|
||||
</td>
|
||||
<td class="rightcell">
|
||||
<xsl:variable name="minutes" select="floor(@duration div 60)" />
|
||||
<xsl:variable name="hours" select="floor(@duration div 3600)" />
|
||||
<xsl:variable name="seconds" select="@duration - $minutes*60 - $hours*3600" />
|
||||
<xsl:value-of select="concat($hours, ':', format-number($minutes, '00'), ':', format-number($seconds, '00'))" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="leftcell">
|
||||
<xsl:value-of select="$locale_strings[@id='viewcount']" />:
|
||||
</td>
|
||||
<td class="rightcell">
|
||||
<xsl:value-of select="@viewcount" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<xsl:if test="@edit='true'">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@duration=0">
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat(rdf:RDF/cc:Work/dc:identifier, '/edit=true')" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<img src="/images/tango/accessories-text-editor.png" style="border:0;vertical-align:bottom;" />edit
|
||||
</a>
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="results">
|
||||
<div>
|
||||
<xsl:choose>
|
||||
|
@ -106,72 +176,7 @@
|
|||
|
||||
<xsl:call-template name="pagination"/>
|
||||
|
||||
<table class="results" align="center">
|
||||
<xsl:for-each select="//results/result">
|
||||
<tr class="result">
|
||||
<td>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
|
||||
</xsl:attribute>
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="@thumbnail" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="alt">
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</a>
|
||||
</td>
|
||||
<td><h2>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
|
||||
</a>
|
||||
</h2>
|
||||
<table class="videometadata">
|
||||
<tr>
|
||||
<td class="leftcell">
|
||||
<xsl:value-of select="$locale_strings[@id='duration']" />:
|
||||
</td>
|
||||
<td class="rightcell">
|
||||
<xsl:variable name="minutes" select="floor(@duration div 60)" />
|
||||
<xsl:variable name="hours" select="floor(@duration div 3600)" />
|
||||
<xsl:variable name="seconds" select="@duration - $minutes*60 - $hours*3600" />
|
||||
<xsl:value-of select="concat($hours, ':', format-number($minutes, '00'), ':', format-number($seconds, '00'))" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="leftcell">
|
||||
<xsl:value-of select="$locale_strings[@id='viewcount']" />:
|
||||
</td>
|
||||
<td class="rightcell">
|
||||
<xsl:value-of select="@viewcount" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<xsl:if test="@edit='true'">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@duration=0">
|
||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat(rdf:RDF/cc:Work/dc:identifier, '/edit=true')" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<img src="/images/tango/accessories-text-editor.png" style="border:0;vertical-align:bottom;" />edit
|
||||
</a>
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
<xsl:call-template name="innerresults"/>
|
||||
|
||||
<xsl:call-template name="pagination"/>
|
||||
|
||||
|
|
Loading…
Reference in a new issue