refinig upload, part one of many. be cautious, as this could break

the upload process.


git-svn-id: http://yolanda.mister-muffin.de/svn@310 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
erlehmann 2008-04-20 00:37:59 +00:00
parent 7942bb2067
commit 379c9aa467
3 changed files with 48 additions and 64 deletions

View file

@ -49,7 +49,6 @@
<xsl:variable name="site_strings" select="document('../config/frontend.xml')//strings/string" /> <xsl:variable name="site_strings" select="document('../config/frontend.xml')//strings/string" />
<xsl:variable name="locale_strings" select="document(concat('../locale/', $locale, '.xml'))//strings/string" /> <xsl:variable name="locale_strings" select="document(concat('../locale/', $locale, '.xml'))//strings/string" />
<xsl:variable name="language_strings" select="document('../locale/languages.xml')//languages/lang" /> <xsl:variable name="language_strings" select="document('../locale/languages.xml')//languages/lang" />
<!-- <!--

View file

@ -12,10 +12,13 @@
<div class="loginbox"> <div class="loginbox">
<form method="post"> <form method="post">
<xsl:attribute name="action"> <xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_login']" /> <xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute> </xsl:attribute>
<fieldset> <fieldset>
<label for="user"> <label for="user">
<xsl:value-of select="$locale_strings[@id='username_or_openid']" />: <xsl:value-of select="$locale_strings[@id='username_or_openid']" />:
</label> </label>
@ -36,6 +39,7 @@
</input> </input>
</fieldset> </fieldset>
</form> </form>
</div> </div>

View file

@ -13,9 +13,9 @@
<xsl:when test="//uploadform/@page=1"> <xsl:when test="//uploadform/@page=1">
<span class="heading"> <h1>
<xsl:value-of select="$locale_strings[@id='title_page_1']" /> <xsl:value-of select="$locale_strings[@id='title_page_1']" />
</span> </h1>
<br /> <br />
<span class="instruction"> <span class="instruction">
@ -29,42 +29,6 @@
<xsl:value-of select="$site_strings[@id='path_upload']" /> <xsl:value-of select="$site_strings[@id='path_upload']" />
</xsl:attribute> </xsl:attribute>
<input name="DC.Creator" type="hidden">
<xsl:attribute name="value">
<xsl:value-of select="//uploadform/@DC.Creator" />
</xsl:attribute>
</input>
<input name="DC.Source" type="hidden">
<xsl:attribute name="value">
<xsl:value-of select="//uploadform/@DC.Source" />
</xsl:attribute>
</input>
<input name="DC.Language" type="hidden">
<xsl:attribute name="value">
<xsl:value-of select="//uploadform/@DC.Language" />
</xsl:attribute>
</input>
<input name="DC.Coverage" type="hidden">
<xsl:attribute name="value">
<xsl:value-of select="//uploadform/@DC.Coverage" />
</xsl:attribute>
</input>
<input name="DC.Rights" type="hidden">
<xsl:attribute name="value">
<xsl:value-of select="//uploadform/@DC.Rights" />
</xsl:attribute>
</input>
<input name="DC.License" type="hidden">
<xsl:attribute name="value">
<xsl:value-of select="//uploadform/@DC.License" />
</xsl:attribute>
</input>
<fieldset> <fieldset>
<xsl:value-of select="$locale_strings[@id='instruction_title']" /> <xsl:value-of select="$locale_strings[@id='instruction_title']" />
@ -95,6 +59,42 @@
</textarea> </textarea>
<br /> <br />
<!-- somehow one cannot access DC.Language from inside the for-each... -->
<xsl:variable name="language" select="//@locale" />
<!--
<xsl:variable name="language" select="//uploadform/@DC.Language" />
<option>
<xsl:if test="not($language)">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:attribute name="value"></xsl:attribute>
<xsl:value-of select="$locale_strings[@id='instruction_language_choose']" />
</option>
-->
<select name="DC.Language" size="1">
<xsl:for-each select="$language_strings">
<option>
<xsl:attribute name="value">
<xsl:value-of select="short" />
</xsl:attribute>
<!--
<xsl:if test="$short=$language">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
-->
<xsl:value-of select="name[@lang='en']" /><!-- language hardcoded to en - this will be solved through simple if/else -->
<xsl:value-of select="name[@lang=$language]" />
<xsl:value-of select="$language" /><!-- debug debug debug -->
</option>
</xsl:for-each>
</select>
<br />
<input type="submit" name="2"> <input type="submit" name="2">
<xsl:attribute name="value"> <xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_next_page']" /> <xsl:value-of select="$locale_strings[@id='button_next_page']" />
@ -111,6 +111,11 @@
</xsl:when> </xsl:when>
<!--
visual blockade between section that is being worked on (↑↑) and those that isn't (↓↓)
-->
<xsl:when test="//uploadform/@page=2"> <xsl:when test="//uploadform/@page=2">
<span class="heading"> <span class="heading">
@ -274,30 +279,6 @@
<xsl:value-of select="$locale_strings[@id='instruction_language']" /> <xsl:value-of select="$locale_strings[@id='instruction_language']" />
<br /> <br />
<!-- somehow one cannot access DC.Language from inside the for-each... -->
<xsl:variable name="language" select="//uploadform/@DC.Language" />
<select name="DC.Language" size="1">
<option>
<xsl:if test="not($language)">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:attribute name="value"></xsl:attribute>
<xsl:value-of select="$locale_strings[@id='instruction_language_choose']" />
</option>
<xsl:for-each select="$language_strings">
<option>
<xsl:variable name="short" select="short" />
<xsl:if test="$short=$language">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:attribute name="value"><xsl:value-of select="$short" /></xsl:attribute>
<xsl:value-of select="name[@lang='en']" /><!-- language hardcoded to en - plz fix this -->
(<xsl:value-of select="name[@lang=$short]" />)
</option>
</xsl:for-each>
</select>
<br />
<xsl:value-of select="$locale_strings[@id='instruction_coverage']" /> <xsl:value-of select="$locale_strings[@id='instruction_coverage']" />
<br /> <br />