comparison gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl @ 387:6de60d996475

First step of changing the operation concept. Static nodes will be rendered as text instead of disabled xforms. gnv/trunk@502 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 04 Jan 2010 15:15:38 +0000
parents 3be414dc974a
children 6e16dc005704
comparison
equal deleted inserted replaced
293:6b0ef2324d02 387:6de60d996475
6 xmlns:art="http://www.intevation.de/2009/artifacts"> 6 xmlns:art="http://www.intevation.de/2009/artifacts">
7 <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="no"/> 7 <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="no"/>
8 8
9 <xsl:template match="*[local-name() = 'select']"> 9 <xsl:template match="*[local-name() = 'select']">
10 <xsl:variable name="selectName" select="@ref"/> 10 <xsl:variable name="selectName" select="@ref"/>
11 <div id="timeseriesfilter"> 11 <div id="timeseriesfilter">
12 <form id="{$selectName}Form" method="post"> 12 <table>
13 <fieldset> 13 <tr>
14 <legend><xsl:value-of select="*[local-name() = 'label']"/></legend> 14 <th class="parameter"><xsl:value-of select="*[local-name() = 'label']"/>:</th>
15 <select name="{$selectName}" multiple="multiple" size="6" disabled="disabled"> <xsl:apply-templates/></select> 15 <td>
16 </fieldset> 16 <table>
17 </form> 17 <xsl:for-each select="./choices/item">
18 <xsl:if test="@selected = 'true'">
19 <tr><td class="value"><xsl:value-of select="./label"/></td></tr>
20 </xsl:if>
21 </xsl:for-each>
22 </table>
23 </td>
24 </tr>
25 </table>
18 </div>  26 </div> 
19 </xsl:template> 27 </xsl:template>
20 <xsl:template match="*[local-name() = 'select1']"> 28 <xsl:template match="*[local-name() = 'select1']">
21 <xsl:variable name="selectName" select="@ref"/> 29 <xsl:variable name="selectName" select="@ref"/>
22 <div id="timeseriesfilter"> 30 <div id="timeseriesfilter">
23 <form id="{$selectName}Form" method="post"> 31 <table>
24 <fieldset> 32 <tr>
25 <legend><xsl:value-of select="*[local-name() = 'label']"/></legend> 33 <th class="parameter"><xsl:value-of select="*[local-name() = 'label']"/>:</th>
26 <select name="{$selectName}" disabled="disabled"> <xsl:apply-templates/></select> 34 <td><xsl:value-of select="./choices/item/label" /></td>
27 </fieldset> 35 </tr>
28 </form> 36 </table>
29 </div> 37 </div>
30 </xsl:template>
31
32 <xsl:template match="*[local-name() = 'item']">
33 <xsl:variable name="optionValue" select="*[local-name() = 'value']"/>
34 <xsl:choose>
35 <xsl:when test="@selected = 'true'">
36 <option value="{$optionValue}" selected="selected"><xsl:value-of select="*[local-name() = 'label']"></xsl:value-of></option>
37 </xsl:when>
38 <xsl:otherwise>
39 <option value="{$optionValue}"><xsl:value-of select="*[local-name() = 'label']"></xsl:value-of></option>
40 </xsl:otherwise>
41 </xsl:choose>
42 </xsl:template> 38 </xsl:template>
43 39
44 <xsl:template match="*[local-name() = 'group']"> 40 <xsl:template match="*[local-name() = 'group']">
45 <xsl:variable name="inputName" select="*[local-name() = 'label']"/> 41 <xsl:variable name="inputName" select="*[local-name() = 'label']"/>
46 <div id="timeseriesfilter"> 42 <div id="timeseriesfilter">
47 <form id="{$inputName}Form" method="post"> 43 <table>
48 <fieldset> 44 <tr>
49 <legend><xsl:value-of select="*[local-name() = 'label']"/></legend> 45 <th class="parameter"><xsl:value-of select="*[local-name() = 'label']"/>:</th>
50 <xsl:apply-templates/> 46 <td>
51 </fieldset> 47 <table>
52 </form> 48 <xsl:for-each select="./input">
49 <tr><td class="value">
50 <xsl:value-of select="./label"/>&#160;<xsl:value-of select="./value"/>
51 </td></tr>
52 </xsl:for-each>
53 </table>
54 </td>
55 </tr>
56 </table>
53 </div> 57 </div>
54 </xsl:template> 58 </xsl:template>
55 59
56 <xsl:template match="*[local-name() = 'input']"> 60 <xsl:template match="*[local-name() = 'input']">
57 <xsl:variable name="inputValue" select="*[local-name() = 'value']"/> 61 <xsl:variable name="inputValue" select="*[local-name() = 'value']"/>
59 <xsl:choose> 63 <xsl:choose>
60 <xsl:when test="*[local-name() = 'label']!= ''"> 64 <xsl:when test="*[local-name() = 'label']!= ''">
61 <xsl:value-of select="*[local-name() = 'label']"/>: 65 <xsl:value-of select="*[local-name() = 'label']"/>:
62 </xsl:when> 66 </xsl:when>
63 </xsl:choose> 67 </xsl:choose>
64 <input type="text" id="{$inputName}" name="{$inputName}" value="{$inputValue}" disabled="disabled"/> 68 <xsl:value-of select="*[local-name() = 'value']"/>
65 </xsl:template> 69 </xsl:template>
66 70
67 <xsl:template match="*[local-name() = 'label']"> 71 <xsl:template match="*[local-name() = 'label']">
68 </xsl:template> 72 </xsl:template>
69 </xsl:stylesheet> 73 </xsl:stylesheet>

http://dive4elements.wald.intevation.org