default_BasisElementAddons.xsl 13.6 KB
<!--
	last update 21.02.2009 @sn

	templates/function in this file
	<xsl:template match="BasisElementAddons">
		<xsl:template match="Infobox" />
		<xsl:template match="TagCloud" />
		<xsl:template match="BasisElementDesign" />
		<xsl:template match="Category" />
		<xsl:template match="BEBasisClipboardsRightManagement" />
	</xsl:template>
-->
<xsl:stylesheet version="1.0"
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:php="http://php.net/xsl" >

	<xsl:template match="BasisElementAddons">
		<xsl:param name="param_url">0</xsl:param>
		<xsl:param name="param_inputBE" />

		<table border="1" width="90%" class="table">.
			<xsl:if test="History">
				<tr><td>
					<xsl:apply-templates select="History" >
						<xsl:with-param name="param_inputBE" select="$param_inputBE" />
					</xsl:apply-templates>
				</td></tr>
			</xsl:if>
			<xsl:if test="Infobox">
				<tr><td>
					<xsl:apply-templates select="Infobox" >
			<!-- 			<xsl:with-param name="param_url"><xsl:value-of select="$var_get_showSingle" /></xsl:with-param> -->
						<xsl:with-param name="param_url"><xsl:value-of select="$param_url" /></xsl:with-param>
					</xsl:apply-templates>
				</td></tr>
			</xsl:if>
			<xsl:if test="../BasisElementDesign">
				<tr><td>
					<xsl:apply-templates select="../BasisElementDesign" >
						<xsl:with-param name="param_inputBE" select="$param_inputBE" />
					</xsl:apply-templates>
				</td></tr>
			</xsl:if>
			<xsl:if test="TagCloud">
				<tr><td>
					<xsl:apply-templates select="TagCloud" >
						<xsl:with-param name="param_url"><xsl:value-of select="$param_url" /></xsl:with-param>
						<xsl:with-param name="param_inputBE" select="$param_inputBE" />
					</xsl:apply-templates>
				</td></tr>
			</xsl:if>
			<xsl:if test="Category">
				<tr><td>
					<xsl:apply-templates select="Category" >
						<xsl:with-param name="param_url"><xsl:value-of select="$param_url" /></xsl:with-param>
						<xsl:with-param name="param_inputBE" select="$param_inputBE" />
					</xsl:apply-templates>
				</td></tr>
			</xsl:if>
			<xsl:if test="LanguageAddon">
				<tr><td>
					<xsl:apply-templates select="LanguageAddon" >
						<xsl:with-param name="param_url"><xsl:value-of select="$param_url" /></xsl:with-param>
						<xsl:with-param name="param_inputBE" select="$param_inputBE" />
					</xsl:apply-templates>
				</td></tr>
			</xsl:if>
		</table>
	</xsl:template>

	<xsl:template match="LanguageAddon">
		<xsl:param name="param_inputBE" />
		<xsl:param name="param_url">0</xsl:param>
		<h3><xsl:value-of select="@label" /></h3>
		<xsl:for-each select="LanguageObjectArray/ContainerClass">
			<span class='NormalFont'><![CDATA[]]>.
				<xsl:apply-templates select="Element" >
					<xsl:with-param name="param_url" select="$param_url" />
					<xsl:with-param name="param_inputBE"><xsl:value-of select="$param_inputBE" />[LanguageAddon][<xsl:value-of select="position()-1" />]</xsl:with-param>
				</xsl:apply-templates>
			</span>
		</xsl:for-each>
	</xsl:template>

	<xsl:template match="History">
		<h3><xsl:value-of select="@label" /></h3>
		<xsl:for-each select="Visit">
			[<a href="{@Url}" title="{@Title}"><xsl:value-of select="position()" /></a>]
		</xsl:for-each>
	</xsl:template>

	<xsl:template match="Infobox">
		<xsl:param name="param_url">0</xsl:param>

		<xsl:if test="BEInfoData">
			<h3><xsl:value-of select="BEInfoData/@label" /></h3>

			<xsl:for-each select="BEInfoData/Action">
				<span class="NormalFont">
					<span class="Value"><li><xsl:value-of select="@label" /> : <xsl:value-of select="@Count_General" /></li></span>
				</span>
			</xsl:for-each>
		</xsl:if>

		<xsl:if test="BEHistory">
			<h3><xsl:value-of select="BEHistory/@label" /></h3>
			<xsl:for-each select="BEHistory/Action">
				<span class="NormalFont">
					<span class="Value"><li><a href="{@Url}"><xsl:value-of select="@label" /> : <xsl:value-of select="@NumberOfAction" /> - <xsl:value-of select="@CDate" /></a></li></span>
				</span>
			</xsl:for-each>
		</xsl:if>

		<xsl:if test="LastLinkerBC">
			<h3><xsl:value-of select="LastLinkerBC/@label" /></h3>

			<xsl:for-each select="LastLinkerBC/List">
				<xsl:call-template name="function_listBasisElement" >
				<!--  <xsl:with-param name="param_url"><xsl:value-of select="$var_url" /></xsl:with-param>-->
				</xsl:call-template>
			</xsl:for-each>
		</xsl:if>


		<xsl:if test="LastBasisElementBC">
			<h3><xsl:value-of select="LastBasisElementBC/@label" /></h3>

			<xsl:for-each select="LastBasisElementBC/List">
				<xsl:call-template name="function_listBasisElement" >
				<!--  <xsl:with-param name="param_url"><xsl:value-of select="$var_url" /></xsl:with-param>-->
				</xsl:call-template>
			</xsl:for-each>
		</xsl:if>


	</xsl:template>

	<xsl:template match="TagCloud">
		<xsl:param name="param_inputBE" />
		<xsl:param name="param_url">0</xsl:param>
		<xsl:param name="param_kind">0</xsl:param>
		<div class="row"><span class="element"><i><b><xsl:value-of select="@label" /></b></i></span></div>

		<xsl:choose>
			<xsl:when test="@edit">
<!--
				<xsl:if test="AllExistentTagList/Tag">
					<div class="row">
						<span class="label"><xsl:value-of select="AllExistentTagList/@label" />:</span>
						<span class="element">
							<select name="{AllExistentTagList/@formkey}" size="3" >
								<xsl:for-each select="AllExistentTagList/Tag">
									<option value="{@key}"><xsl:value-of select="@label" /></option>
								</xsl:for-each>
							</select>
						</span>
					</div>
				</xsl:if>
 -->
				<xsl:apply-templates select="Element" >
				    <xsl:with-param name="param_inputBE" select="$param_inputBE" />
				</xsl:apply-templates>
			</xsl:when>
			<xsl:otherwise>


				<xsl:variable name="var_get_TagContentList">
					<xsl:call-template name="function_get_TagContentList" >
						<xsl:with-param name="param_url">
							<xsl:choose>
								<xsl:when test="@MTextID">
									<xsl:call-template name="function_get_showSingle" >
										<xsl:with-param name="param_url"><xsl:value-of select="$param_url" /></xsl:with-param>
									</xsl:call-template>
									<xsl:value-of select="@MTextID" />
								</xsl:when>
								<xsl:otherwise>
									<xsl:value-of select="$param_url" />
								</xsl:otherwise>
							</xsl:choose>
						</xsl:with-param>
						<xsl:with-param name="param_kind"><xsl:value-of select="@BasisClipboard" /></xsl:with-param>
					</xsl:call-template>
				</xsl:variable>

				<xsl:for-each select="TreeTagList/Tag">
					<xsl:variable name="var_size"><xsl:value-of select="@count" /></xsl:variable>
					<strong style="margin-left:10px;font-size:{@size}%;color:gray;">
						<a href="{$var_get_TagContentList}{@TagID}"  title="{@count} mal wurde der '{@TagName}' Tag bis zur {../../@depth} Subebene verwendet "><xsl:value-of select="@TagName" /></a>
					</strong>
				</xsl:for-each>
			</xsl:otherwise>
		</xsl:choose>

	</xsl:template>

	<xsl:template match="BasisElementDesign">
		<xsl:param name="param_inputBE" />
		<div class="row">
			<span class="element"><i><b><xsl:value-of select="@label" /></b></i></span>
		</div>

		<xsl:choose>
			<xsl:when test="@edit">
				<div class="row">		<span class="label">ID:</span><span class="element"><xsl:value-of select="@ID" /> </span>		</div>
				<div class="row">		<span class="label">BEClassName:</span><span class="element"><xsl:value-of select="@BEClassName" /></span>		</div>
				<div class="row">		<span class="label">CDate:</span><span class="element"><xsl:value-of select="@CDate" /></span>		</div>
				<div class="row">		<span class="label">Author_ProfileID:</span><span class="element"><xsl:value-of select="@Author_ProfileID" /></span>		</div>

				<div class="row">		<span class="label">CSS:</span><span class="element"><input name="{$param_inputBE}[BasisElementDesign][CSS]" class="width" type="text" size="30" maxlength="" value="{@CSS}"  />	</span>	</div>

				<div class="row">		<span class="label">Element:</span><span class="element"><input name="{$param_inputBE}[BasisElementDesign][Values][0][VKey]" class="width" type="text" size="30" maxlength="" value=""  /><input name="{$param_inputBE}[BasisElementDesign][Values][0][VValue]" class="width" type="text" size="30" maxlength="" value=""  /></span>		</div>
				<xsl:apply-templates select="Values" >
					<xsl:with-param name="param_edit_mainkey">BasisElementDesign</xsl:with-param>
					<xsl:with-param name="param_inputBE" select="$param_inputBE" />
				</xsl:apply-templates>

			</xsl:when>
			<xsl:otherwise>
				<div class="row">		<span class="label">class:</span><span class="element"><xsl:value-of select="@class" /></span>		</div>
				<div class="row">		<span class="label">ID:</span><span class="element"><xsl:value-of select="@ID" /></span>		</div>
				<div class="row">		<span class="label">BEClassName:</span><span class="element"><xsl:value-of select="@BEClassName" /></span>		</div>
				<div class="row">		<span class="label">CDate:</span><span class="element"><xsl:value-of select="@CDate" /></span>		</div>
				<div class="row">		<span class="label">CSS:</span><span class="element"><xsl:value-of select="@CSS" /></span>		</div>
				<div class="row">		<span class="label">Author_ProfileID:</span><span class="element"><xsl:value-of select="@Author_ProfileID" /></span>		</div>

				<xsl:apply-templates select="Values" >
					<xsl:with-param name="param_inputBE" select="$param_inputBE" />
				</xsl:apply-templates>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="Category">
		<xsl:param name="param_inputBE" />
		<xsl:param name="param_url">0</xsl:param>
		<div class="row">
			<span class="element"><i><b><xsl:value-of select="@label" /></b></i></span>
		</div>
		<xsl:if test="List/Category">
			<div class="row">
				<span class="label"><xsl:value-of select="@label" />:</span>
				<span class="element">
					<xsl:choose>
						<xsl:when test="@edit">
							<input type="hidden" name="{$param_inputBE}[BECategoryChoiceBEID]" value="{@BECategoryChoiceBEID}"   />
							<select name="{$param_inputBE}[{List/@objvar}][]" class="width" size="6" multiple="multiple">
								<xsl:for-each select="List/Category">
									<xsl:choose>
										<xsl:when test="@selected">
											<option selected="selected" value="{@BECategoryID}"><xsl:value-of select="@BECategoryName" />(<xsl:value-of select="@BECategoryID" />)</option>
										</xsl:when>
										<xsl:otherwise>
											<option value="{@BECategoryID}"><xsl:value-of select="@BECategoryName" />(<xsl:value-of select="@BECategoryID" />)</option>
										</xsl:otherwise>
									</xsl:choose>
									<xsl:if test="Category">
										<xsl:for-each select="Category">
											<ul>
												<xsl:choose>
													<xsl:when test="@selected">
														<option selected="selected" value="{@BECategoryID}">- <xsl:value-of select="@BECategoryName" />(<xsl:value-of select="@BECategoryID" />)</option>
													</xsl:when>
													<xsl:otherwise>
														<option value="{@BECategoryID}">- <xsl:value-of select="@BECategoryName" />(<xsl:value-of select="@BECategoryID" />)</option>
													</xsl:otherwise>
												</xsl:choose>
											</ul>
										</xsl:for-each>
									</xsl:if>
								</xsl:for-each>
							</select>
						</xsl:when>
						<xsl:otherwise>
							<xsl:variable name="var_get_BCList">
								<xsl:call-template name="function_get_TagContentList" >
									<xsl:with-param name="param_url">
										<xsl:choose>
											<xsl:when test="@MTextID">
												<xsl:call-template name="function_get_showSingle" >
													<xsl:with-param name="param_url"><xsl:value-of select="$param_url" /></xsl:with-param>
												</xsl:call-template>
												<xsl:value-of select="@MTextID" />
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="$param_url" />
											</xsl:otherwise>
										</xsl:choose>
									</xsl:with-param>
<!--  									<xsl:with-param name="param_url">
										<xsl:call-template name="function_get_showSingle" >
											<xsl:with-param name="param_url"><xsl:value-of select="$param_url" /></xsl:with-param>
										</xsl:call-template>
										<xsl:value-of select="@MTextID" />
									</xsl:with-param>
-->
									<xsl:with-param name="param_kind"><xsl:value-of select="@BasisClipboard" /></xsl:with-param>
								</xsl:call-template>
							</xsl:variable>
							<xsl:for-each select="List/Category">
								<xsl:choose>
									<xsl:when test="@selected">
										<li><b><u><a href="{$var_get_BCList}{@BECategoryID}" ><xsl:value-of select="@BECategoryName" /> (<xsl:value-of select="@BECategoryID" />)</a></u></b></li>
									</xsl:when>
									<xsl:otherwise>
										<!-- <li><a href="{$var_get_BCList}{@BECategoryID}" ><xsl:value-of select="@BECategoryName" /> (<xsl:value-of select="@BECategoryID" />)</a></li> -->
									</xsl:otherwise>
								</xsl:choose>
								<xsl:if test="Category">
									<xsl:for-each select="Category">
										<xsl:choose>
											<xsl:when test="@selected"> <!-- dies wieder rein-->
												<ul><li><b><u><a href="{$var_get_BCList}{@BECategoryID}" ><xsl:value-of select="@BECategoryName" /> (<xsl:value-of select="@BECategoryID" />)</a></u></b></li></ul>
<!-- 												<ul><li><b><xsl:value-of select="@BECategoryName" /> (<xsl:value-of select="@BECategoryID" />)</b></li></ul> -->
											</xsl:when>
											<xsl:otherwise>
											<!-- <ul><li><a href="{$var_get_BCList}{@BECategoryID}" ><xsl:value-of select="@BECategoryName" /> (<xsl:value-of select="@BECategoryID" />)</a></li></ul> -->

											</xsl:otherwise>
										</xsl:choose>
									</xsl:for-each>
								</xsl:if>
							</xsl:for-each>
						</xsl:otherwise>
					</xsl:choose>
				</span>
			</div>
		</xsl:if>
		<xsl:apply-templates select="Element" >
		     <xsl:with-param name="param_inputBE" select="$param_inputBE" />
		</xsl:apply-templates>
	</xsl:template>

</xsl:stylesheet>