Mercurial > dive4elements > gnv-client
comparison gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl @ 582:b8ea9383d285
Implemented a One-Step-Back-History.
gnv/trunk@723 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 02 Mar 2010 10:53:30 +0000 |
parents | f21ad239c748 |
children | 21ad44ccdb84 |
comparison
equal
deleted
inserted
replaced
581:f0f0d4eaee58 | 582:b8ea9383d285 |
---|---|
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="back-url"/> | 12 <xsl:param name="back-url"/> |
13 <xsl:param name="selectfis"/> | 13 <xsl:param name="selectfis"/> |
14 <xsl:param name="edit">bearbeiten</xsl:param> | 14 <xsl:param name="edit">bearbeiten</xsl:param> |
15 <xsl:param name="total"><xsl:value-of select="count(*)"/></xsl:param> | |
15 | 16 |
16 <!-- start parsing document --> | 17 <!-- start parsing document --> |
17 <xsl:template match="*"> | 18 <xsl:template match="*"> |
18 <table class="static"> | 19 <table class="static"> |
19 <xsl:apply-templates /> | 20 <xsl:apply-templates /> |
21 </xsl:template> | 22 </xsl:template> |
22 | 23 |
23 | 24 |
24 <!-- match multi select boxes --> | 25 <!-- match multi select boxes --> |
25 <xsl:template match="xform:select"> | 26 <xsl:template match="xform:select"> |
26 <xsl:variable name="state" select="@art:state" /> | |
27 <tr> | 27 <tr> |
28 <th class="parameter"><xsl:value-of select="xform:label" /></th> | 28 <th class="parameter"><xsl:value-of select="xform:label" /></th> |
29 <td><xsl:apply-templates select="xform:choices" /></td> | 29 <td><xsl:apply-templates select="xform:choices" /></td> |
30 <td class="historyback"> | 30 <td class="historyback"> |
31 <xsl:if test="$state != ''"> | 31 <xsl:call-template name="InsertEdit"> |
32 <a href="{$back-url}?target={$state}"> | 32 <xsl:with-param name="state" select="@art:state" /> |
33 <img title="{$edit}" alt="{$edit}" src="images/back_button.png"/> | 33 <xsl:with-param name="index" select="position()" /> |
34 </a> | 34 <xsl:with-param name="fis" select="@art:fis" /> |
35 </xsl:if> | 35 </xsl:call-template> |
36 </td> | 36 </td> |
37 </tr> | 37 </tr> |
38 </xsl:template> | 38 </xsl:template> |
39 | 39 |
40 | 40 |
41 <xsl:template name="InsertEdit"> | |
42 <xsl:param name="state" /> | |
43 <xsl:param name="index" /> | |
44 <xsl:param name="fis" /> | |
45 <xsl:if test="$state != ''"> | |
46 <xsl:if test="$index = $total"> | |
47 <a href="{$back-url}?target={$state}"> | |
48 <img title="{$edit}" alt="{$edit}" src="images/back_button.png"/> | |
49 </a> | |
50 </xsl:if> | |
51 </xsl:if> | |
52 <xsl:if test="$fis"> | |
53 <a href="{$selectfis}"><img title="{$edit}" alt="{$edit}" src="images/back_button.png"/></a> | |
54 </xsl:if> | |
55 </xsl:template> | |
56 | |
57 | |
41 <!-- match select boxes --> | 58 <!-- match select boxes --> |
42 <xsl:template match="xform:select1"> | 59 <xsl:template match="xform:select1"> |
43 <xsl:variable name="state" select="@art:state" /> | |
44 <xsl:variable name="fis" select="@art:fis" /> | |
45 <tr> | 60 <tr> |
46 <th class="parameter"><xsl:value-of select="xform:label" /></th> | 61 <th class="parameter"><xsl:value-of select="xform:label" /></th> |
47 <td><xsl:apply-templates select="xform:choices" /></td> | 62 <td><xsl:apply-templates select="xform:choices" /></td> |
48 <td class="historyback"> | 63 <td class="historyback"> |
49 <xsl:if test="$state != ''"> | 64 <xsl:call-template name="InsertEdit"> |
50 <a href="{$back-url}?target={$state}"> | 65 <xsl:with-param name="state" select="@art:state" /> |
51 <img title="{$edit}" alt="{$edit}" src="images/back_button.png"/> | 66 <xsl:with-param name="index" select="position()" /> |
52 </a> | 67 <xsl:with-param name="fis" select="@art:fis" /> |
53 </xsl:if> | 68 </xsl:call-template> |
54 <xsl:if test="$fis"> | |
55 <a href="{$selectfis}"><img title="{$edit}" alt="{$edit}" src="images/back_button.png"/></a> | |
56 </xsl:if> | |
57 </td> | 69 </td> |
58 </tr> | 70 </tr> |
59 </xsl:template> | 71 </xsl:template> |
60 | 72 |
61 | 73 |
73 </xsl:template> | 85 </xsl:template> |
74 | 86 |
75 | 87 |
76 <!-- match group items --> | 88 <!-- match group items --> |
77 <xsl:template match="xform:group"> | 89 <xsl:template match="xform:group"> |
78 <xsl:variable name="state" select="@art:state" /> | |
79 <tr> | 90 <tr> |
80 <th class="parameter"><xsl:value-of select="xform:label" /></th> | 91 <th class="parameter"><xsl:value-of select="xform:label" /></th> |
81 <td> | 92 <td> |
82 <table><xsl:apply-templates select="xform:input" /></table> | 93 <table><xsl:apply-templates select="xform:input" /></table> |
83 </td> | 94 </td> |
84 <td class="historyback"> | 95 <td class="historyback"> |
85 <xsl:if test="$state != ''"> | 96 <xsl:call-template name="InsertEdit"> |
86 <a href="{$back-url}?target={$state}"><img title="{$edit}" alt="{$edit}" src="images/back_button.png"/></a> | 97 <xsl:with-param name="state" select="@art:state" /> |
87 </xsl:if> | 98 <xsl:with-param name="index" select="position()" /> |
99 <xsl:with-param name="fis" select="@art:fis" /> | |
100 </xsl:call-template> | |
88 </td> | 101 </td> |
89 </tr> | 102 </tr> |
90 </xsl:template> | 103 </xsl:template> |
91 | 104 |
92 | 105 |