You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
276 lines
9.5 KiB
276 lines
9.5 KiB
2 years ago
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||
|
<xsl:import href="levels.xsl" />
|
||
|
<xsl:template match="/">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
|
||
|
<title>Eingabemaske</title>
|
||
|
<LINK REL="stylesheet" type="text/css" href="../style/superx.css"/>
|
||
|
<LINK REL="stylesheet" type="text/css" href="../xml/maske_html.css"/>
|
||
|
</head>
|
||
|
<body>
|
||
|
<p align="right">
|
||
|
<a href="http://www.superx-projekt.de" title="Zur SuperX-Homepage">
|
||
|
<img src="../applet/images/info.gif" alt="Zur SuperX-Homepage" border="0" /></a>
|
||
|
</p>
|
||
|
<xsl:if test="/maske/nachricht !=''"><p>
|
||
|
<xsl:copy-of select="/maske/nachricht" /></p>
|
||
|
|
||
|
</xsl:if>
|
||
|
<p class="maskentitel"><xsl:value-of select="maske/felder/feld/maskenname" /></p>
|
||
|
<p>Bitte schränken Sie Ihre Auswahl ein:</p>
|
||
|
<form name="maske" action="SuperXmlTabelle" method="post"><input type="hidden" name="UserID">
|
||
|
<xsl:attribute name="value"><xsl:value-of select="/maske/UserID"/></xsl:attribute>
|
||
|
</input>
|
||
|
|
||
|
<xsl:for-each select="maske/felder">
|
||
|
<p><input type="hidden" name="tid">
|
||
|
<xsl:attribute name="value">
|
||
|
<xsl:value-of select="../../maske/@tid"/>
|
||
|
</xsl:attribute>
|
||
|
</input>
|
||
|
<xsl:for-each select="feld">
|
||
|
<xsl:call-template name="feld">
|
||
|
</xsl:call-template>
|
||
|
<br></br>
|
||
|
</xsl:for-each>
|
||
|
<br></br>
|
||
|
<input type="submit" value="Abschicken"/>
|
||
|
</p>
|
||
|
</xsl:for-each>
|
||
|
</form>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
</xsl:template>
|
||
|
<xsl:template name="feld">
|
||
|
|
||
|
|
||
|
<xsl:call-template name="inputfeld"/><br></br>
|
||
|
</xsl:template>
|
||
|
<xsl:template name="inputfeld">
|
||
|
|
||
|
<xsl:if test="obligatorisch='1'">
|
||
|
<b>
|
||
|
<xsl:value-of select="name"/>
|
||
|
</b>
|
||
|
</xsl:if>
|
||
|
<xsl:if test="obligatorisch='0'">
|
||
|
<xsl:value-of select="name"/>
|
||
|
</xsl:if>
|
||
|
 
|
||
|
<xsl:choose>
|
||
|
<xsl:when test="art='0'">
|
||
|
|
||
|
<xsl:if test="zeilenanzahl='1'">
|
||
|
<input type="text">
|
||
|
<xsl:attribute name="NAME">
|
||
|
<xsl:value-of select="name"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:attribute name="id">
|
||
|
<xsl:value-of select="name"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:attribute name="MAXLENGTH">
|
||
|
<xsl:value-of select="laenge"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:attribute name="VALUE">
|
||
|
<xsl:value-of select="defaultwert/sqlerg/row/col0"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:attribute name="size">
|
||
|
<xsl:value-of select="feldbreite"/>
|
||
|
</xsl:attribute>
|
||
|
</input>
|
||
|
</xsl:if>
|
||
|
<xsl:if test="zeilenanzahl!='1'">
|
||
|
<textarea WRAP="on">
|
||
|
<xsl:attribute name="cols">
|
||
|
<xsl:value-of select="feldbreite"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:attribute name="rows">
|
||
|
<xsl:value-of select="zeilenanzahl"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:attribute name="NAME">
|
||
|
<xsl:value-of select="name"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:value-of select="defaultwert/sqlerg/row/col0"/>
|
||
|
</textarea>
|
||
|
</xsl:if>
|
||
|
|
||
|
</xsl:when>
|
||
|
<xsl:when test="art='1'">
|
||
|
<SELECT>
|
||
|
<xsl:attribute name="NAME">
|
||
|
<xsl:value-of select="name"/>
|
||
|
</xsl:attribute>
|
||
|
<OPTION/>
|
||
|
<xsl:for-each select="relation/sqlerg/row">
|
||
|
<OPTION>
|
||
|
<xsl:attribute name="value">
|
||
|
<xsl:value-of select="col0"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:if test="../../../defaultwert/sqlerg/row/col0=col0">
|
||
|
<xsl:attribute name="selected">
|
||
|
true
|
||
|
</xsl:attribute>
|
||
|
</xsl:if>
|
||
|
<xsl:value-of select="col1"/>
|
||
|
</OPTION>
|
||
|
</xsl:for-each>
|
||
|
</SELECT>
|
||
|
</xsl:when>
|
||
|
<xsl:when test="art='2'">
|
||
|
<SELECT>
|
||
|
<xsl:attribute name="NAME">
|
||
|
<xsl:value-of select="name"/>
|
||
|
</xsl:attribute>
|
||
|
<OPTION/>
|
||
|
<xsl:for-each select="relation/sqlerg/row">
|
||
|
<OPTION>
|
||
|
<xsl:attribute name="value">
|
||
|
<xsl:value-of select="col0"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:if test="../../../defaultwert/sqlerg/row/col1=col1">
|
||
|
<xsl:attribute name="selected">
|
||
|
true
|
||
|
</xsl:attribute>
|
||
|
</xsl:if>
|
||
|
<xsl:value-of select="col1"/>
|
||
|
</OPTION>
|
||
|
</xsl:for-each>
|
||
|
</SELECT>
|
||
|
</xsl:when>
|
||
|
<xsl:when test="art='3'">
|
||
|
<input type="file">
|
||
|
<xsl:attribute name="NAME">
|
||
|
<xsl:value-of select="name"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:attribute name="size">
|
||
|
<xsl:value-of select="feldbreite"/>
|
||
|
</xsl:attribute>
|
||
|
</input>
|
||
|
</xsl:when>
|
||
|
<xsl:when test="art='4'">
|
||
|
<xsl:call-template name="treeview">
|
||
|
</xsl:call-template>
|
||
|
<input type="hidden" name="Organigramm-Stand">
|
||
|
<xsl:attribute name="value">
|
||
|
<xsl:value-of select="/maske/@datum"/>
|
||
|
</xsl:attribute>
|
||
|
</input>
|
||
|
<input type="hidden" name="erlaubt" value="1"/>
|
||
|
</xsl:when>
|
||
|
<xsl:when test="art='6'">
|
||
|
<xsl:call-template name="treeview">
|
||
|
</xsl:call-template>
|
||
|
<input type="hidden" name="Organigramm-Stand">
|
||
|
<xsl:attribute name="value">
|
||
|
<xsl:value-of select="/maske/@datum"/>
|
||
|
</xsl:attribute>
|
||
|
</input><input type="hidden" name="erlaubt" value="1"/>
|
||
|
</xsl:when>
|
||
|
<xsl:when test="art='7'">
|
||
|
<xsl:call-template name="treeview">
|
||
|
</xsl:call-template>
|
||
|
<input type="hidden" name="Organigramm-Stand">
|
||
|
<xsl:attribute name="value">
|
||
|
<xsl:value-of select="/maske/@datum"/>
|
||
|
</xsl:attribute>
|
||
|
</input>
|
||
|
<input type="hidden" name="erlaubt" value="1"/>
|
||
|
</xsl:when>
|
||
|
<xsl:when test="art='9'">
|
||
|
<xsl:call-template name="treeview">
|
||
|
</xsl:call-template>
|
||
|
</xsl:when>
|
||
|
<xsl:when test="art='10'">
|
||
|
<input type="checkbox" value="true">
|
||
|
<xsl:attribute name="NAME">
|
||
|
<xsl:value-of select="name"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:attribute name="checked">
|
||
|
<xsl:value-of select="defaultwert/sqlerg/row/col0"/>
|
||
|
</xsl:attribute>
|
||
|
</input>
|
||
|
|
||
|
</xsl:when>
|
||
|
<xsl:otherwise>Unbekanntes Feld</xsl:otherwise>
|
||
|
</xsl:choose>
|
||
|
|
||
|
</xsl:template>
|
||
|
<xsl:template name="treeview">
|
||
|
<!--Das Treeview-Control geht davon aus, dass im sqlerg die Felder wie folgt belegt sind:
|
||
|
col0 enthält den Volltext des Eintrags,
|
||
|
col1 die nr bzw. key_apnr beim Organigramm
|
||
|
col2 den parent-Knoten
|
||
|
-->
|
||
|
<select>
|
||
|
<xsl:attribute name="name">
|
||
|
<xsl:value-of select="name"/>
|
||
|
</xsl:attribute>
|
||
|
<option></option>
|
||
|
<xsl:variable name="t_root"/>
|
||
|
<xsl:for-each select="relation/sqlerg/row">
|
||
|
<xsl:if test="((col2='null') or (col2=''))">
|
||
|
<!--Zuerst wird root eingefügt, und dann alle Kinder von Root -->
|
||
|
<OPTION>
|
||
|
<xsl:attribute name="value">
|
||
|
<xsl:value-of select="col1"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:if test="../../../defaultwert/sqlerg/row/col1=col1">
|
||
|
<xsl:attribute name="selected">
|
||
|
true
|
||
|
</xsl:attribute>
|
||
|
</xsl:if>
|
||
|
<xsl:value-of select="col0"/>
|
||
|
</OPTION>
|
||
|
|
||
|
<xsl:call-template name="suche_kinder">
|
||
|
<xsl:with-param name="elter" select="col1"/>
|
||
|
<xsl:with-param name="ausgewaehlt" select="../../../defaultwert/sqlerg/row/col1"/>
|
||
|
<xsl:with-param name="ebene" select="0"/>
|
||
|
</xsl:call-template>
|
||
|
|
||
|
</xsl:if>
|
||
|
|
||
|
</xsl:for-each>
|
||
|
|
||
|
</select>
|
||
|
</xsl:template>
|
||
|
|
||
|
|
||
|
<xsl:template name="suche_kinder">
|
||
|
<xsl:param name="elter"/>
|
||
|
<xsl:param name="ausgewaehlt"/>
|
||
|
<xsl:param name="ebene"/>
|
||
|
<xsl:for-each select="../row">
|
||
|
|
||
|
<xsl:variable name="i" select="col2"/>
|
||
|
|
||
|
<xsl:if test="$i=$elter">
|
||
|
|
||
|
<OPTION>
|
||
|
<xsl:attribute name="value">
|
||
|
<xsl:value-of select="col1"/>
|
||
|
</xsl:attribute>
|
||
|
<xsl:if test="$ausgewaehlt=col1">
|
||
|
<xsl:attribute name="selected">
|
||
|
true
|
||
|
</xsl:attribute>
|
||
|
</xsl:if>
|
||
|
<xsl:call-template name="levels">
|
||
|
<xsl:with-param name="ebene" select="$ebene"/>
|
||
|
</xsl:call-template>
|
||
|
<xsl:value-of select="col0"/>
|
||
|
</OPTION>
|
||
|
<xsl:call-template name="suche_kinder">
|
||
|
<xsl:with-param name="elter" select="col1"/>
|
||
|
<xsl:with-param name="ausgewaehlt" select="$ausgewaehlt"/>
|
||
|
<xsl:with-param name="ebene" select="$ebene+1"/>
|
||
|
</xsl:call-template>
|
||
|
</xsl:if>
|
||
|
|
||
|
</xsl:for-each>
|
||
|
|
||
|
</xsl:template>
|
||
|
</xsl:stylesheet>
|