Mercurial > dive4elements > gnv-client
comparison gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl @ 688:f3f433053bdd
Changed the behavior of parameter-measurement-matrix (issue210).
gnv/trunk@893 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 09 Apr 2010 09:50:12 +0000 |
parents | ef1ff5fdab5b |
children | 271ec4d11a9f |
comparison
equal
deleted
inserted
replaced
687:acf62a4a23db | 688:f3f433053bdd |
---|---|
90 <tr> | 90 <tr> |
91 <td><!-- nothing here --></td> | 91 <td><!-- nothing here --></td> |
92 <!-- take the first select node to render column labels --> | 92 <!-- take the first select node to render column labels --> |
93 <xsl:apply-templates select="xform:select[1]/xform:item" mode="matrixHeader"/> | 93 <xsl:apply-templates select="xform:select[1]/xform:item" mode="matrixHeader"/> |
94 </tr> | 94 </tr> |
95 <tr> | |
96 <td><!-- nothing here --></td> | |
97 <xsl:apply-templates select="xform:select[1]/xform:item" mode="matrixSelectable"/> | |
98 </tr> | |
95 <!-- render matrix' body --> | 99 <!-- render matrix' body --> |
96 <xsl:apply-templates select="xform:select" mode="matrix" /> | 100 <xsl:apply-templates select="xform:select" mode="matrix" /> |
97 </table> | 101 </table> |
98 </xsl:otherwise> | 102 </xsl:otherwise> |
99 </xsl:choose> | 103 </xsl:choose> |
101 | 105 |
102 <!-- rendering column headers (measurements) --> | 106 <!-- rendering column headers (measurements) --> |
103 <xsl:template match="xform:item" mode="matrixHeader"> | 107 <xsl:template match="xform:item" mode="matrixHeader"> |
104 <td class="matrixHeader"> | 108 <td class="matrixHeader"> |
105 <xsl:value-of select="xform:label/text()"/> | 109 <xsl:value-of select="xform:label/text()"/> |
110 </td> | |
111 </xsl:template> | |
112 | |
113 <!-- --> | |
114 <xsl:template match="xform:item" mode="matrixSelectable"> | |
115 <xsl:variable name="value" select="xform:value/text()"/> | |
116 <xsl:variable name="name" select="@ref"/> | |
117 <td class="matrixSelectableHeader"> | |
118 <input type="checkbox" name="{$name}" value="{$value}" /> | |
106 </td> | 119 </td> |
107 </xsl:template> | 120 </xsl:template> |
108 | 121 |
109 | 122 |
110 <!-- render the first column with parameter names into matrix --> | 123 <!-- render the first column with parameter names into matrix --> |
119 <!-- render checkboxes and disable checkboxes for invalid parameter | 132 <!-- render checkboxes and disable checkboxes for invalid parameter |
120 measurements --> | 133 measurements --> |
121 <xsl:template match="xform:item" mode="matrix"> | 134 <xsl:template match="xform:item" mode="matrix"> |
122 <xsl:variable name="value" select="xform:value/text()"/> | 135 <xsl:variable name="value" select="xform:value/text()"/> |
123 <xsl:variable name="name" select="@ref"/> | 136 <xsl:variable name="name" select="@ref"/> |
124 <td> | 137 <td class="matrixContent"> |
125 <xsl:choose> | 138 <xsl:choose> |
126 <xsl:when test="@disabled = 'true'"> | 139 <xsl:when test="@disabled = 'true'"> |
127 <input type="checkbox" name="{$name}" value="{$value}" disabled="true"></input> | 140 <img src="./images/delete.png"/> |
128 </xsl:when> | 141 </xsl:when> |
129 <xsl:otherwise> | 142 <xsl:otherwise> |
130 <input type="checkbox" name="{$name}" value="{$value}"></input> | 143 <img src="./images/tick.png"/> |
131 </xsl:otherwise> | 144 </xsl:otherwise> |
132 </xsl:choose> | 145 </xsl:choose> |
133 </td> | 146 </td> |
134 </xsl:template> | 147 </xsl:template> |
135 | 148 |