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

Render direct links as list. gnv/trunk@1214 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 15 Jun 2010 05:26:44 +0000
parents b1eea43ba133
children 1b42a86184f6
comparison
equal deleted inserted replaced
1003:cf5ab5eaeb46 1004:a0d16ccb82ba
46 <xsl:variable name="selectName" select="@ref"/> 46 <xsl:variable name="selectName" select="@ref"/>
47 <xsl:variable name="items" select="count(.//xform:item)"/> 47 <xsl:variable name="items" select="count(.//xform:item)"/>
48 <legend><xsl:value-of select="xform:label"/></legend> 48 <legend><xsl:value-of select="xform:label"/></legend>
49 <xsl:choose> 49 <xsl:choose>
50 <xsl:when test="$items &lt; 6"> 50 <xsl:when test="$items &lt; 6">
51 <xsl:apply-templates mode="direct-link"/> 51 <ul><xsl:apply-templates mode="direct-link"/></ul>
52 </xsl:when> 52 </xsl:when>
53 <xsl:otherwise> 53 <xsl:otherwise>
54 <select name="{$selectName}"> 54 <select name="{$selectName}">
55 <xsl:apply-templates /> 55 <xsl:apply-templates />
56 </select> 56 </select>
62 62
63 <!-- options for select: direct-link --> 63 <!-- options for select: direct-link -->
64 <xsl:template match="xform:item" mode="direct-link"> 64 <xsl:template match="xform:item" mode="direct-link">
65 <xsl:variable name="optionValue" select="xform:value"/> 65 <xsl:variable name="optionValue" select="xform:value"/>
66 <xsl:variable name="selectName" select="ancestor::xform:select1/@ref"/> 66 <xsl:variable name="selectName" select="ancestor::xform:select1/@ref"/>
67 <a class="linkButton" 67 <li><a onclick="displayOverlay()"
68 onclick="displayOverlay()" 68 href="{$next-url}?{$selectName}={$optionValue}"><xsl:value-of select="xform:label"/></a></li>
69 href="{$next-url}?{$selectName}={$optionValue}"><xsl:value-of select="xform:label"/></a>
70 <br/>
71 <br/>
72 </xsl:template> 69 </xsl:template>
73 70
74 <!-- multi select --> 71 <!-- multi select -->
75 <xsl:template match="xform:select"> 72 <xsl:template match="xform:select">
76 <xsl:variable name="selectName" select="@ref"/> 73 <xsl:variable name="selectName" select="@ref"/>

http://dive4elements.wald.intevation.org