Mercurial > dive4elements > gnv-client
diff gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl @ 394:14eecfde4607
Render links to step back to previous states into gui. Added controller to advance back to these states.
gnv/trunk@538 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 13 Jan 2010 22:17:02 +0000 |
parents | 416ff31f6273 |
children | 002a4d38c16d |
line wrap: on
line diff
--- a/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl Wed Jan 13 11:29:40 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl Wed Jan 13 22:17:02 2010 +0000 @@ -4,71 +4,85 @@ xmlns="http://www.w3.org/2002/xforms" xmlns:xform="http://www.w3.org/2002/xforms" xmlns:art="http://www.intevation.de/2009/artifacts"> - <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="no"/> + + <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="no" /> + + <xsl:param name="back-url"/> + + <!-- start parsing document --> + <xsl:template match="*"> + <table class="static"> + <xsl:apply-templates /> + </table> + </xsl:template> + + <!-- match multi select boxes --> <xsl:template match="xform:select"> - <xsl:variable name="selectName" select="@ref"/> - <div id="timeseriesfilter"> - <table> - <tr> - <th class="parameter"><xsl:value-of select="xform:label"/>:</th> - <td> - <table> - <xsl:apply-templates select="xform:choices/xform:item" mode="table"/> - </table> - </td> - </tr> - </table> - </div> + <xsl:variable name="state" select="@art:state" /> + <tr> + <td class="historyback"> + <xsl:if test="$state != ''"> + <a href="{$back-url}?target={$state}">[X]</a> + </xsl:if> + </td> + <th class="parameter"><xsl:value-of select="xform:label" /></th> + <td><xsl:apply-templates select="xform:choices" /></td> + </tr> </xsl:template> - <xsl:template match="xform:item" mode="table"> - <xsl:if test="@selected = 'true'"> - <tr> - <td class="value"><xsl:value-of select="./xform:label"/></td> - </tr> - </xsl:if> - </xsl:template> - - + <!-- match select boxes --> <xsl:template match="xform:select1"> - <xsl:variable name="selectName" select="@ref"/> - <div id="timeseriesfilter"> - <table> - <tr> - <th class="parameter"><xsl:value-of select="xform:label"/>:</th> - <td><xsl:value-of select="./xform:choices/xform:item/xform:label" /></td> - </tr> - </table> - </div> + <xsl:variable name="state" select="@art:state" /> + <tr> + <td class="historyback"> + <xsl:if test="$state != ''"> + <a href="{$back-url}?target={$state}">[X]</a> + </xsl:if> + </td> + <th class="parameter"><xsl:value-of select="xform:label" /></th> + <td><xsl:apply-templates select="xform:choices" /></td> + </tr> </xsl:template> - - <xsl:template match="xform:group"> - <xsl:variable name="inputName" select="xform:label"/> - <div id="timeseriesfilter"> - <table> - <tr> - <th class="parameter"><xsl:value-of select="xform:label"/>:</th> - <td> - <table> - <xsl:apply-templates select="xform:input" mode="table"/> - </table> - </td> - </tr> - </table> - </div> + + <!-- match item list of select boxes or multi select boxes --> + <xsl:template match="xform:choices"> + <table class="choices"><xsl:apply-templates select="xform:item" /></table> </xsl:template> - <xsl:template match="xform:input" mode="table"> + <!-- match item of select boxes or multi select boxes --> + <xsl:template match="xform:item"> <tr> - <td class="value"> - <xsl:value-of select="./xform:label"/> <xsl:value-of select="./xform:value"/> + <td class="value"><xsl:value-of select="xform:label" /></td> + </tr> + </xsl:template> + + + <!-- match group items --> + <xsl:template match="xform:group"> + <xsl:variable name="state" select="@art:state" /> + <tr> + <td class="historyback"> + <xsl:if test="$state != ''"> + <a href="{$back-url}?target={$state}">[X]</a> + </xsl:if> + </td> + <th class="parameter"><xsl:value-of select="xform:label" /></th> + <td> + <table><xsl:apply-templates select="xform:input" /></table> </td> </tr> </xsl:template> + <!-- match single group item --> + <xsl:template match="xform:input"> + <tr> + <td class="value"><xsl:value-of select="xform:label" /> <xsl:value-of select="xform:value" /></td> + </tr> + </xsl:template> + </xsl:stylesheet>