comparison gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl @ 993:9b126bceb0b2

gnv/issue219: Added rendering of direct links. gnv/trunk@1194 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 10 Jun 2010 22:01:23 +0000
parents 13de46229f63
children 27029f0ec7e1
comparison
equal deleted inserted replaced
992:9ff116474e7b 993:9b126bceb0b2
9 <xsl:output 9 <xsl:output
10 method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="no" /> 10 method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="no" />
11 11
12 <xsl:param name="example-linestring"/> 12 <xsl:param name="example-linestring"/>
13 <xsl:param name="example-polygon"/> 13 <xsl:param name="example-polygon"/>
14 <xsl:param name="next-url">/gnv/next.do</xsl:param>
15 <xsl:param name="further">false</xsl:param>
16 <xsl:param name="exception"/>
17 <xsl:param name="gnviewer-select-button-src">./images/auswaehlen.png</xsl:param>
18
19 <xsl:template match="node()">
20 <div id="timeseriesfilter">
21 <form id="fisSelectionForm"
22 onsubmit="displayOverlay()"
23 action="{$next-url}"
24 method="post">
25 <fieldset>
26 <xsl:if test="$exception != ''">
27 <div class="inputException"><xsl:value-of select="$exception"/></div>
28 </xsl:if>
29 <xsl:apply-templates mode="basic"/>
30 <h2>Here i am</h2>
31 <h2>"<xsl:value-of select="$further"/>"</h2>
32 <xsl:if test="$further = 'true'">
33 <br/>
34 <input style="margin-top: 5px;" type="image" src="{$gnviewer-select-button-src}"/>
35 </xsl:if>
36 </fieldset>
37 </form>
38 </div>
39 </xsl:template>
14 40
15 <!-- single select --> 41 <!-- single select -->
16 <xsl:template match="xform:select1"> 42 <xsl:template match="xform:select1" mode="basic">
17 <xsl:variable name="selectName" select="@ref"/> 43 <xsl:variable name="selectName" select="@ref"/>
18 <legend><xsl:value-of select="xform:label"/></legend> 44 <legend><xsl:value-of select="xform:label"/></legend>
19 <select name="{$selectName}"> 45 <select name="{$selectName}">
20 <xsl:apply-templates /> 46 <xsl:apply-templates mode="basic"/>
21 </select> 47 </select>
22 </xsl:template> 48 </xsl:template>
23 49
24 50
25 <!-- multi select --> 51 <!-- multi select -->
26 <xsl:template match="xform:select"> 52 <xsl:template match="xform:select" mode="basic">
27 <xsl:variable name="selectName" select="@ref"/> 53 <xsl:variable name="selectName" select="@ref"/>
28 <xsl:variable name="items" select="count(//xform:item)"/> 54 <xsl:variable name="items" select="count(//xform:item)"/>
29 <legend> 55 <legend>
30 <xsl:value-of select="xform:label"/> 56 <xsl:value-of select="xform:label"/>
31 </legend> 57 </legend>
36 <xsl:apply-templates mode="selected"/> 62 <xsl:apply-templates mode="selected"/>
37 </select> 63 </select>
38 </xsl:when> 64 </xsl:when>
39 <xsl:when test="$items &lt; 5"> 65 <xsl:when test="$items &lt; 5">
40 <select name="{$selectName}" multiple="multiple" size="{$items}"> 66 <select name="{$selectName}" multiple="multiple" size="{$items}">
41 <xsl:apply-templates/> 67 <xsl:apply-templates mode="basic"/>
42 </select> 68 </select>
43 </xsl:when> 69 </xsl:when>
44 <xsl:otherwise> 70 <xsl:otherwise>
45 <select name="{$selectName}" multiple="multiple" size="5"> 71 <select name="{$selectName}" multiple="multiple" size="5">
46 <xsl:apply-templates /> 72 <xsl:apply-templates mode="basic"/>
47 </select> 73 </select>
48 </xsl:otherwise> 74 </xsl:otherwise>
49 </xsl:choose> 75 </xsl:choose>
50 </xsl:template> 76 </xsl:template>
51 77
52 78
53 <!-- options for select --> 79 <!-- options for select -->
54 <xsl:template match="xform:item"> 80 <xsl:template match="xform:item" mode="basic">
55 <xsl:variable name="optionValue" select="xform:value"/> 81 <xsl:variable name="optionValue" select="xform:value"/>
56 <xsl:choose> 82 <xsl:choose>
57 <xsl:when test="@selected = 'true'"> 83 <xsl:when test="@selected = 'true'">
58 <option value="{$optionValue}" selected="selected"> 84 <option value="{$optionValue}" selected="selected">
59 <xsl:value-of select="xform:label"/> 85 <xsl:value-of select="xform:label"/>
75 </option> 101 </option>
76 </xsl:template> 102 </xsl:template>
77 103
78 104
79 105
80 <xsl:template match="xform:group"> 106 <xsl:template match="xform:group" mode="basic">
81 <xsl:variable name="selectcount" select="count(xform:select)"/> 107 <xsl:variable name="selectcount" select="count(xform:select)"/>
82 108
83 <legend> 109 <legend>
84 <xsl:value-of select="xform:label"/> 110 <xsl:value-of select="xform:label"/>
85 </legend> 111 </legend>
86 112
87 <xsl:choose> 113 <xsl:choose>
88 <xsl:when test="$selectcount &lt; '1'"> 114 <xsl:when test="$selectcount &lt; '1'">
89 <table class="dynamic"> 115 <table class="dynamic">
90 <xsl:apply-templates/> 116 <xsl:apply-templates mode="basic"/>
91 </table> 117 </table>
92 </xsl:when> 118 </xsl:when>
93 <xsl:otherwise> 119 <xsl:otherwise>
94 <table class="static"> 120 <table class="static">
95 <tr> 121 <tr>
150 </xsl:choose> 176 </xsl:choose>
151 </td> 177 </td>
152 </xsl:template> 178 </xsl:template>
153 179
154 180
155 <xsl:template match="xform:input"> 181 <xsl:template match="xform:input" mode="basic">
156 <xsl:variable name="inputValue" select="xform:value"/> 182 <xsl:variable name="inputValue" select="xform:value"/>
157 <xsl:variable name="inputName" select="@ref"/> 183 <xsl:variable name="inputName" select="@ref"/>
158 <xsl:variable name="label" select="xform:label"/> 184 <xsl:variable name="label" select="xform:label"/>
159 185
160 <!-- TODO: Remove this when we have the GIS interface. (slt) --> 186 <!-- TODO: Remove this when we have the GIS interface. (slt) -->
179 </td> 205 </td>
180 </tr> 206 </tr>
181 </xsl:template> 207 </xsl:template>
182 208
183 209
184 <xsl:template match="xform:label"> 210 <xsl:template match="xform:label" mode="basic">
185 <!-- do nothing here --> 211 <!-- do nothing here -->
186 </xsl:template> 212 </xsl:template>
187 213
188 </xsl:stylesheet> 214 </xsl:stylesheet>

http://dive4elements.wald.intevation.org