default.xsl 10.7 KB
<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0" 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
								xmlns:php="http://php.net/xsl" >

	<xsl:import href="../../../../../System/xsl/dev/default_Global.xsl"/>
	<xsl:import href="../../../../../System/xsl/dev/default_Tools.xsl"/>
	<!--<xsl:import href="../../../../../System/xsl/default_AccountManagement.xsl"/>-->
	<xsl:import href="../../../../../System/xsl/dev/default_BasisElement.xsl"/>
	<xsl:import href="../../../../../System/xsl/dev/default_BasisClipboard.xsl"/>
	<xsl:import href="../../../../../System/xsl/dev/default_BasisElementAddons.xsl"/>

	<xsl:output method="html" encoding="utf-8"  indent="no" />

	<xsl:template match="/">
		<html>
			<head>
				<xsl:apply-templates select="//XMLSite_Head" />
				<!--<script language="javascript" src="include/Lib/Plugins/tiny_mce/tiny_mce.js" type="text/javascript" >tiny_mce</script>-->
				<!--<script language="javascript" src="include/Lib/Plugins/config_tinyMCE.js" type="text/javascript">tiny_mce</script>-->
				<!--<script language="javascript" src="include/System/jscripts/prototype/prototype.js" type="text/javascript">extern libary</script>-->
				<!--<script language="javascript" src="include/System/jscripts/fnc_chkFormular.inc.js" type="text/javascript">intern</script>-->
				<!--<script language="javascript" src="include/System/jscripts/fnc_Go.inc.js" type="text/javascript">intern</script>-->
				<!--<script language="javascript" src="include/System/jscripts/fnc_makeDivElementVisible.inc.js" type="text/javascript">intern</script>-->
				<script language="javascript" src="include/System/jscripts/mc_snippets.inc.js" type="text/javascript">intern</script>
			</head>
			<body>
				<div class="Site">

					<xsl:apply-templates select="//XMLSite_Top" />
					<xsl:apply-templates select="//XMLSite_Left" />
					<xsl:apply-templates select="//XMLSite_Right" />
					<xsl:apply-templates select="//XMLSite_Display" />
				</div>
			</body>
		</html>
	</xsl:template>


	<xsl:template match="XMLSite_Head">
		<xsl:variable name="href"> <xsl:value-of select="XMLStylesheet/href" /> </xsl:variable>
		<xsl:variable name="name"> <xsl:value-of select="XMLStylesheet/name" /> </xsl:variable>
		<title><xsl:value-of select="title" /></title>
		<link rel="stylesheet" type="text/css" href="{$href}" title="{$name}" />
	</xsl:template>

	<xsl:template match="XMLSite_Right">
		<div class="Right">
			<xsl:for-each select="BasisClipboard/List">
				<xsl:call-template name="function_listBasisElement" >
					<xsl:with-param name="param_url">?</xsl:with-param>
				</xsl:call-template>
			</xsl:for-each>
		</div>
	</xsl:template>

	<xsl:template match="XMLSite_Top">
		<div class="Top">
			<!--	<a href="?"><img src="include/Images/portal_logo_blue.jpg" height="100"  title="[LOSP] Local Open Source Portal"/></a>-->
		</div>
	</xsl:template>

	<xsl:template match="XMLSite_Left">
		<div class="Left">
			<xsl:if test="BasisClipboard">
				<xsl:for-each select="BasisClipboard/List">
					<div class="ShortBox">
						<xsl:call-template name="function_listBasisElement" >
							<xsl:with-param name="param_url">?</xsl:with-param>
						</xsl:call-template>
					</div><br/>
				</xsl:for-each>
			</xsl:if>
			<xsl:if test="XMLMenu_Portal/Link">
				<div class="ShortBox"><xsl:apply-templates select="XMLMenu_Portal" /></div>
			</xsl:if>

			<xsl:if test="/content/Account/XMLButtonGroup/Link">
				<div class="ShortBox"><xsl:apply-templates select="/content/Account/XMLButtonGroup/Link" /></div>
			</xsl:if>
			<xsl:if test="XMLMenu_Profile/XMLButtonGroup">
				<div class="ShortBox"><xsl:apply-templates select="XMLMenu_Profile" /></div>
			</xsl:if>

			<xsl:for-each select="XMLMenu_SocialMovement">
				<div class="ShortBox">
					<span class="ModuleFont"><xsl:value-of select="@Subject"/></span><br />
					<xsl:apply-templates select="XMLButtonGroup" />
				</div>
			</xsl:for-each>
			<xsl:for-each select="XMLMenu_Economy">
				<div class="ShortBox">
					<span class="ModuleFont"><xsl:value-of select="@Subject"/></span><br />
					<xsl:apply-templates select="XMLButtonGroup" />
				</div>
			</xsl:for-each>
			<xsl:for-each select="XMLMenu_Culture">
				<div class="ShortBox">
					<span class="ModuleFont"><xsl:value-of select="@Subject"/></span><br />
					<xsl:apply-templates select="XMLButtonGroup" />
				</div>
			</xsl:for-each>

			<xsl:if test="XMLDisplay_Friends/List/profile">
				<div class="ShortBox"><xsl:apply-templates select="XMLDisplay_Friends/List" /></div>
			</xsl:if>
			<xsl:if test="XMLDisplay_UserData/single/account">
				<div class="ShortBox"><xsl:apply-templates select="XMLDisplay_UserData/single/account" /></div>
			</xsl:if>
			<xsl:if test="Formular/login and not(XMLDisplay_UserData/single/account) and not(//XMLSite_Display/AccountManagement)">
				<div class="ShortBox">
					<xsl:apply-templates select="Link" />
					<xsl:apply-templates select="Formular/login" />
				</div>
			</xsl:if>
		</div>
	</xsl:template>


	<xsl:template match="XMLButtonGroup">
		<xsl:param name="param_url">0</xsl:param>
		<xsl:apply-templates select="Link" />
		<xsl:apply-templates select="XMLButtonContainer/Link" />
	</xsl:template>

	<xsl:template match="XML_Button">
		<div class="XMLButton">[<a href="{@url}?p[0]={@parameter}"><xsl:value-of select="@label"/></a>]</div>
		<xsl:for-each select="XML_Button">
			<div class="XMLButton">[<a href="{@url}?p[0]={@parameter}"><xsl:value-of select="@label"/></a>]</div>
		</xsl:for-each>
	</xsl:template>


	<xsl:template match="XMLSite_Display">
		<div class="Display">
			<xsl:apply-templates select="ErrorList" />
			<xsl:apply-templates select="BasisElementAddons" />
			<xsl:if test="BasisClipboard"><xsl:apply-templates select="BasisClipboard" /></xsl:if>
			<xsl:if test="BasisElement">
				##########################################################################################
				<xsl:call-template name="function_listBasisElement" >
					<!-- <xsl:with-param name="param_url"><xsl:value-of select="$var_url" /></xsl:with-param> -->
				</xsl:call-template>
				<div class="ContentBox">
					<span class="ModulFunctionFont">Einzelansicht <xsl:value-of select="../BasisElement/@label" /></span>
					<xsl:apply-templates select="BasisElement" ></xsl:apply-templates>
				</div>

			</xsl:if>

			<xsl:apply-templates select="AccountManagement" />
			<p><xsl:value-of select="DisplayMessage" /></p>
			<xsl:apply-templates select="XMLButton" />
			<xsl:apply-templates select="multimediatext" />
		</div>
	</xsl:template>


	<xsl:template match="XMLMenu_Profile">
		<span class="ModuleFont">Profil</span>
		<xsl:apply-templates select="/content/Account" />
		<xsl:apply-templates select="Link" />
		<xsl:apply-templates select="XMLButtonGroup" />
	</xsl:template>


	<xsl:template match="XMLMenu_Portal">
		<span class="ModuleFont">Portal</span>
		<xsl:apply-templates select="Link" />
	</xsl:template>


	<xsl:template match="ErrorList">
		<div id="ErrorList">
			<xsl:for-each select="Error">
				<table border="1" width="100%" class="error">
					<tr><td><b>Error: <xsl:apply-templates select="Title" /></b> in function <xsl:apply-templates select="Function" /></td></tr>
					<tr><td><xsl:apply-templates select="Comment" /></td></tr>
					<tr><td><p class="code"><xsl:apply-templates select="Code" /></p></td></tr>
				</table>
			</xsl:for-each>
		</div>
	</xsl:template>


	<xsl:template match="Formular/login">
		<xsl:variable name="ID_maxlength"> <xsl:value-of select="ID/@maxlength" /> </xsl:variable>
		<xsl:variable name="Password_maxlength"> <xsl:value-of select="Password/@maxlength" /> </xsl:variable>
		<xsl:variable name="Function"> <xsl:value-of select="@function" /> </xsl:variable>
		<b><i>Login:</i></b>
		<div class="formbox">
			<form name="Formular" method="post" action="index.php" >
				<div class="row">
					<span class="label">ID / NickName:</span>
					<span class="element"><input type="text" name="ID" class="width" size="6" maxlength="{$ID_maxlength}" /></span>
				</div>
				<div class="row">
					<span class="label">Passwort:</span>
					<span class="element"><input type="password" name="password" class="width" size="6" maxlength="{$Password_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>
				<input type="hidden" name="function" value="{$Function}"  />
			</form>
		</div>
	</xsl:template>


	<xsl:template match="NewPassword">
		<xsl:variable name="maxlength"> <xsl:value-of select="@maxlength" /> </xsl:variable>
		<tr><td>Passwort:</td><td><input type="password" name="password1" size="11" maxlength="{$maxlength}" /></td></tr>
		<tr><td>Wiederholung:</td><td><input type="password" name="password2" size="11" maxlength="{$maxlength}" /></td></tr>
	</xsl:template>
	
	<xsl:template match="Account">
		<xsl:variable name="var_Action"><xsl:value-of select="@action" /></xsl:variable>
		<div class="formbox">
			<form>
				<div class="row">
					<span class="label">Aktives Profil</span>
					<span class="element">
						<select name="HostProfileID"  class="width" onchange="Go(this.options[this.options.selectedIndex].value)">
							<xsl:for-each select="BasisElement/SwitchProfileList/ShortProfile">
								<xsl:choose>
									<xsl:when test="@ActiveProfile"><option value="{@ID}" selected="selected"><xsl:value-of select="@NickName" /> (<xsl:value-of select="@PartOfObjVar" />)</option></xsl:when>
									<xsl:otherwise><option value="{@ID}"><xsl:value-of select="@NickName" /> (<xsl:value-of select="@PartOfObjVar" />)</option></xsl:otherwise>
								</xsl:choose>
							</xsl:for-each>
						</select>
					</span>
				</div>
			</form>
		</div>
	</xsl:template>

	<xsl:template name="loop_FormularOption">
		<xsl:param name="index">0</xsl:param>
		<xsl:param name="max">0</xsl:param>
		<xsl:param name="selected"></xsl:param>

		<xsl:if test="$index &lt; $max">
			<xsl:choose>
				<xsl:when test="$index=$selected"><xsl:value-of select="php:function('XSLPHPFunction::getStartTagSelectOptionSelected', . )" disable-output-escaping="yes" /></xsl:when>
				<xsl:otherwise><xsl:value-of select="php:function('XSLPHPFunction::getStartTagSelectOption', . )" disable-output-escaping="yes" /></xsl:otherwise>
			</xsl:choose>
			<xsl:if test="$index &lt; 10">0</xsl:if>
			<xsl:value-of select="$index"/>
			<xsl:value-of select="php:function('XSLPHPFunction::getEndTagSelectOption', . )" disable-output-escaping="yes" />
			<xsl:call-template name="loop_FormularOption">
				<xsl:with-param name="index"><xsl:value-of select="$index + 1"/></xsl:with-param>
				<xsl:with-param name="max"><xsl:value-of select="$max"/></xsl:with-param>
				<xsl:with-param name="selected"><xsl:value-of select="$selected"/></xsl:with-param>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet>