default_Tools.xsl 8.68 KB
<!--
	last update 21.02.2009 @sn
	
	templates/function in this file
	<xsl:template match="Values" />
	<xsl:template name="Function_TimeFormular" />
	<xsl:template name="function_addDateToDateBC" />
	<xsl:template match="Formular/addProfile" />
	<xsl:template match="Formular/List" />
-->
<xsl:stylesheet version="1.0"
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:php="http://php.net/xsl" > 

	<xsl:template match="Values">
		<xsl:param name="param_edit_mainkey">0</xsl:param>
		<xsl:param name="param_inputBE">0</xsl:param>
		
		<xsl:if test="Element">
			<div class="row"><span class="element"><xsl:value-of select="@label" /></span>		</div>
			<xsl:choose>
				<xsl:when test="$param_edit_mainkey=0">
					<div class="row"><span class="label">Key:</span>	<span class="element">Value</span>		</div>
					<xsl:for-each select="Element">
						<xsl:variable name="var_tmp_i"><xsl:value-of select="position()" /></xsl:variable>
						<div class="row">
							<span class="label"><xsl:value-of select="$var_tmp_i" />: <xsl:value-of select="@key" /></span>
							<span class="element"><xsl:value-of select="@value" /></span>
						</div>
					</xsl:for-each>
				</xsl:when>
				<xsl:otherwise>
					<xsl:choose>
						<xsl:when test="$param_inputBE=0">
							<xsl:for-each select="Element">
								<xsl:variable name="var_tmp_i"><xsl:value-of select="position()" /></xsl:variable>
								<div class="row"><span class="label">Element <xsl:value-of select="$var_tmp_i" />:</span><span class="element"><input name="{$param_edit_mainkey}[Values][{$var_tmp_i}][VKey]" class="width" type="text" size="30" maxlength="" value="{@key}"  /><input name="{$param_edit_mainkey}[Values][{$var_tmp_i}][VValue]" class="width" type="text" size="30" maxlength="" value="{@value}"  /></span>		</div>
							</xsl:for-each>
						</xsl:when>
						<xsl:otherwise>
							<xsl:for-each select="Element">
								<xsl:variable name="var_tmp_i"><xsl:value-of select="position()" /></xsl:variable>
								<div class="row"><span class="label">Element <xsl:value-of select="$var_tmp_i" />:</span><span class="element"><input name="{$param_inputBE}[{$param_edit_mainkey}][Values][{$var_tmp_i}][VKey]" class="width" type="text" size="30" maxlength="" value="{@key}"  /><input name="{$param_inputBE}[{$param_edit_mainkey}][Values][{$var_tmp_i}][VValue]" class="width" type="text" size="30" maxlength="" value="{@value}"  /></span>		</div>
							</xsl:for-each>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:template>


	<xsl:template match="Formular/password">
		<xsl:variable name="maxlength"> <xsl:value-of select="Password/@maxlength" /> </xsl:variable>
		<xsl:variable name="Function"> <xsl:value-of select="@function" /> </xsl:variable>

		<div class="formbox">
			<form name="Formular" method="post" action="" onsubmit="return chkFormular()">
				<div class="row">
					<span class="label">altes Passwort</span>
					<span class="element"><input type="password" name="oldpassword" size="11" maxlength="{$maxlength}" /></span>
				</div>
				<div class="row">
					<span class="label">neues Passwort</span>
					<span class="element"><input type="password" name="newpassword1" size="11" maxlength="{$maxlength}" /></span>
				</div>
				<div class="row">
					<span class="label">Wiederholung</span>
					<span class="element"><input type="password" name="newpassword2" size="11" maxlength="{$maxlength}" /></span>
				</div>
				<input type="hidden" name="function" value="{$Function}"  />
				<div class="row">
					<span class="element">
						<span class="button"><input type="reset" value="Cancel" /></span>
						<span class="button"><input type="submit" name="Submit" value="OK" /></span>
					</span>
				</div>
			</form>
		</div>
	</xsl:template>

	<xsl:template name="Function_TimeFormular">
		<xsl:param name="param_prefix">0</xsl:param>
		<xsl:param name="difference_hour">0</xsl:param>
		<xsl:param name="param_time">0</xsl:param>
		<xsl:param name="param_inputBE" />

		<select name="{$param_inputBE}[{$param_prefix}day]">
			<xsl:call-template name="loop_FormularOption">
				<xsl:with-param name="index">1</xsl:with-param>
				<xsl:with-param name="max">32</xsl:with-param>
				<xsl:with-param name="selected"><xsl:value-of select="php:functionString('XSLPHPFunction::getThisDay', string($param_time) )" /></xsl:with-param>
			</xsl:call-template>					
		</select>.
		<select name="{$param_inputBE}[{$param_prefix}month]">
			<xsl:call-template name="loop_FormularOption">
				<xsl:with-param name="index">1</xsl:with-param>
				<xsl:with-param name="max">13</xsl:with-param>
				<xsl:with-param name="selected"><xsl:value-of select="php:functionString('XSLPHPFunction::getThisMonth', string($param_time) )" /></xsl:with-param>
			</xsl:call-template>					
		</select>.
		<select name="{$param_inputBE}[{$param_prefix}year]">
			<xsl:call-template name="loop_FormularOption">
				<xsl:with-param name="index">2006</xsl:with-param>
				<xsl:with-param name="max">2016</xsl:with-param>
				<xsl:with-param name="selected"><xsl:value-of select="php:functionString('XSLPHPFunction::getThisYear', string($param_time) )" /></xsl:with-param>
			</xsl:call-template>					
		</select><xsl:text disable-output-escaping="no">&#160;&#160;</xsl:text>
		<select name="{$param_inputBE}[{$param_prefix}hour]">
			<xsl:call-template name="loop_FormularOption">
				<xsl:with-param name="index">0</xsl:with-param>
				<xsl:with-param name="max">24</xsl:with-param>
				<xsl:with-param name="selected"><xsl:value-of select="php:functionString('XSLPHPFunction::getThisHour', string($param_time) )" /></xsl:with-param>
			</xsl:call-template>					
		</select>:
		<select name="{$param_inputBE}[{$param_prefix}minute]">
			<xsl:call-template name="loop_FormularOption">
				<xsl:with-param name="index">0</xsl:with-param>
				<xsl:with-param name="max">60</xsl:with-param>
				<xsl:with-param name="selected"><xsl:value-of select="php:functionString('XSLPHPFunction::getThisMinute', string($param_time) )" /></xsl:with-param>
			</xsl:call-template>
		</select> Uhr
	</xsl:template>


	<xsl:template name="function_addDateToDateBC">
		<xsl:variable name="Action"> <xsl:value-of select="@action" /> </xsl:variable>
		<xsl:variable name="var_ID"> <xsl:value-of select="ID" /> </xsl:variable>
		<div class="formbox">
			<form name="Formular" method="post" action="" onsubmit="return chkFormular()">
				<!--<xsl:if test="List/profile">-->
				<xsl:if test="List/BasisElement">
					<div class="row">
						<span class="label">Kalender von_:</span>
						<span class="element">
							<select name="Profiles[]" class="width" size="3" multiple="multiple">
								<xsl:for-each select="List/BasisElement">
									<xsl:variable name="var_value_ID"><xsl:value-of select="ID" /></xsl:variable>
									<option value="{$var_value_ID}"><xsl:value-of select="Headline/Element" /> (<xsl:value-of select="Headline/Element/@class" />)</option>
								</xsl:for-each>
							</select>
						</span>
					</div>
				</xsl:if>
				<input type="hidden" name="SelectID" value="{$var_ID}"  />
				<div class="row">
					<span class="element">
						<span class="button"><input type="reset" value="Abbrechen" /></span>
						<span class="button"><input type="submit" name="Submit" value="OK" /></span>
					</span>
				</div>
			</form>
		</div>
	</xsl:template>


	<xsl:template match="Formular/addProfile">
		<xsl:variable name="NickName_maxlength"> <xsl:value-of select="NickName/@maxlength" /> </xsl:variable>
		<div class="formbox">
			<form name="Formular" method="post" action="" onsubmit="return chkFormular()">
				<div class="row">
					<span class="label">Profil Name:</span>
					<span class="element"><input name="NickName" type="text"  class="width" maxlength="{$NickName_maxlength}"  /></span>
				</div>			
				<div class="row">
					<span class="element">			
						<span class="button"><input type="reset" value="Cancel" /></span>
						<span class="button"><input type="submit" name="Submit" value="OK" /></span>
					</span>
				</div>
			</form>
		</div>
	</xsl:template>


	<xsl:template match="Formular/List">
		<div class="formbox">
			<form name="Formular" method="post" action="" onsubmit="return chkFormular()">
				<div class="row">
					<span class="label">Profil Name:</span>
					<span class="element">
						<select name="NickName" size="1" class="width">
							<option></option>
							<xsl:for-each select="profile">
								<option><xsl:value-of select="NickName" /></option>
							</xsl:for-each>
						</select>
					</span>
				</div>			
				<div class="row">
					<span class="element">			
						<span class="button"><input type="reset" value="Cancel" /></span>
						<span class="button"><input type="submit" name="Submit" value="OK" /></span>
					</span>
				</div>
			</form>
		</div>	
	</xsl:template>


	

</xsl:stylesheet>