comparison gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl @ 1002:b1eea43ba133

Second attempt to apply redirect link patch. gnv/trunk@1206 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 13 Jun 2010 16:28:37 +0000
parents 27029f0ec7e1
children a0d16ccb82ba
comparison
equal deleted inserted replaced
1001:ebc3d018af6a 1002:b1eea43ba133
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="uuid"/>
15 <xsl:param name="next-url">/gnv/next.do</xsl:param>
16 <xsl:param name="further">false</xsl:param>
17 <xsl:param name="exception"/>
18 <xsl:param name="gnviewer-select-button-src">./images/auswaehlen.png</xsl:param>
19
20 <xsl:template match="art:ui">
21 <xsl:if test="$further = 'true'">
22 <div id="timeseriesfilter">
23 <form id="fisSelectionForm"
24 onsubmit="displayOverlay()"
25 action="{$next-url}"
26 method="post">
27 <fieldset>
28 <xsl:if test="$exception != ''">
29 <div class="inputException"><xsl:value-of select="$exception"/></div>
30 </xsl:if>
31 <input type="hidden" name="artifact-uuid" value="{$uuid}"/>
32 <xsl:apply-templates select="art:dynamic"/>
33 <xsl:variable name="item-count" select="count(art:dynamic//xform:select1//xform:item)"/>
34 <xsl:if test="$item-count = 0 or $item-count &gt; 5">
35 <br/>
36 <input style="margin-top: 5px;" type="image" src="{$gnviewer-select-button-src}"/>
37 </xsl:if>
38 </fieldset>
39 </form>
40 </div>
41 </xsl:if>
42 </xsl:template>
14 43
15 <!-- single select --> 44 <!-- single select -->
16 <xsl:template match="xform:select1"> 45 <xsl:template match="xform:select1" >
17 <xsl:variable name="selectName" select="@ref"/> 46 <xsl:variable name="selectName" select="@ref"/>
47 <xsl:variable name="items" select="count(.//xform:item)"/>
18 <legend><xsl:value-of select="xform:label"/></legend> 48 <legend><xsl:value-of select="xform:label"/></legend>
19 <select name="{$selectName}"> 49 <xsl:choose>
20 <xsl:apply-templates /> 50 <xsl:when test="$items &lt; 6">
21 </select> 51 <xsl:apply-templates mode="direct-link"/>
22 </xsl:template> 52 </xsl:when>
23 53 <xsl:otherwise>
54 <select name="{$selectName}">
55 <xsl:apply-templates />
56 </select>
57 </xsl:otherwise>
58 </xsl:choose>
59 </xsl:template>
60
61 <xsl:template match="text()" mode="direct-link"/>
62
63 <!-- options for select: direct-link -->
64 <xsl:template match="xform:item" mode="direct-link">
65 <xsl:variable name="optionValue" select="xform:value"/>
66 <xsl:variable name="selectName" select="ancestor::xform:select1/@ref"/>
67 <a class="linkButton"
68 onclick="displayOverlay()"
69 href="{$next-url}?{$selectName}={$optionValue}"><xsl:value-of select="xform:label"/></a>
70 <br/>
71 <br/>
72 </xsl:template>
24 73
25 <!-- multi select --> 74 <!-- multi select -->
26 <xsl:template match="xform:select"> 75 <xsl:template match="xform:select">
27 <xsl:variable name="selectName" select="@ref"/> 76 <xsl:variable name="selectName" select="@ref"/>
28 <xsl:variable name="items" select="count(//xform:item)"/> 77 <xsl:variable name="items" select="count(.//xform:item)"/>
29 <legend> 78 <legend>
30 <xsl:value-of select="xform:label"/> 79 <xsl:value-of select="xform:label"/>
31 </legend> 80 </legend>
32 81
33 <xsl:choose> 82 <xsl:choose>

http://dive4elements.wald.intevation.org