[2] | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
[55] | 2 | <xsl:stylesheet |
---|
| 3 | version="1.0" |
---|
| 4 | xmlns:html="http://www.w3.org/1999/xhtml" |
---|
| 5 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
[2] | 6 | |
---|
| 7 | <!-- |
---|
| 8 | module : |
---|
| 9 | creation des élements components de formulaire |
---|
| 10 | |
---|
| 11 | update : |
---|
[17] | 12 | $Id$ |
---|
[55] | 13 | fplod 2008-04-29T09:06:37Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 14 | chgt fot dbk5 |
---|
[17] | 15 | fplod 2007-06-08T09:07:12Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 16 | bug fix for components_date |
---|
[2] | 17 | fplod 2007-05-18T10:25:06Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 18 | correction pour cause de dysfonctionnement sous firefox (mais ok sous safari) : |
---|
| 19 | Le 1er choix est modifié si on clique sur un des choix suivant |
---|
| 20 | fplod 2007-04-27T15:16:34Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 21 | ajout date |
---|
| 22 | fplod 2007-04-26T10:07:08Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 23 | creation |
---|
| 24 | --> |
---|
| 25 | |
---|
| 26 | <xsl:template name="components"> |
---|
[31] | 27 | <xsl:param name="user"/> |
---|
[55] | 28 | <xsl:param name="author_id"/> |
---|
[2] | 29 | <xsl:param name="visu_modif"/> |
---|
| 30 | |
---|
| 31 | <xsl:text>
</xsl:text> |
---|
[55] | 32 | <xsl:element name="html:fieldset"> |
---|
| 33 | <xsl:attribute name="xml:id">components_<xsl:value-of select="$author_id"/></xsl:attribute> |
---|
[2] | 34 | <xsl:text>
</xsl:text> |
---|
[55] | 35 | <xsl:element name="html:legend"> |
---|
[2] | 36 | Used NEMO components |
---|
| 37 | </xsl:element> |
---|
| 38 | <xsl:text>
</xsl:text> |
---|
| 39 | <!-- ne plait pas à firefox ++ |
---|
[55] | 40 | <xsl:element name="html:label"> |
---|
[2] | 41 | --> |
---|
[31] | 42 | <xsl:for-each select="$user/components/component"> |
---|
[2] | 43 | <xsl:sort order="ascending" data-type="text" select="@code"/> |
---|
| 44 | <xsl:text>
</xsl:text> |
---|
| 45 | <xsl:comment><xsl:value-of select="./value"/></xsl:comment> |
---|
| 46 | <xsl:choose> |
---|
| 47 | <xsl:when test="@code != 'zzz_other'"> |
---|
| 48 | <xsl:text>
</xsl:text> |
---|
[55] | 49 | <xsl:element name="html:input"> |
---|
[2] | 50 | <xsl:attribute name="name"> |
---|
| 51 | <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/> |
---|
| 52 | </xsl:attribute> |
---|
| 53 | <xsl:attribute name="type">checkbox</xsl:attribute> |
---|
| 54 | <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute> |
---|
| 55 | <xsl:if test="$visu_modif= 'visu'"> |
---|
| 56 | <xsl:attribute name="readonly">1</xsl:attribute> |
---|
| 57 | </xsl:if> |
---|
| 58 | <xsl:if test="./value = 'yes'"> |
---|
| 59 | <xsl:attribute name="checked">1</xsl:attribute> |
---|
| 60 | </xsl:if> |
---|
| 61 | <xsl:value-of select="./name"/> |
---|
| 62 | </xsl:element> |
---|
| 63 | </xsl:when> |
---|
| 64 | <xsl:when test="@code = 'zzz_other'"> |
---|
| 65 | <xsl:text>
</xsl:text> |
---|
[55] | 66 | <xsl:element name="html:label"> |
---|
[2] | 67 | Other : |
---|
| 68 | <xsl:text>
</xsl:text> |
---|
[55] | 69 | <xsl:element name="html:input"> |
---|
[2] | 70 | <xsl:attribute name="name"> |
---|
| 71 | <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/> |
---|
| 72 | </xsl:attribute> |
---|
| 73 | <xsl:attribute name="type">text</xsl:attribute> |
---|
| 74 | <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute> |
---|
| 75 | </xsl:element> |
---|
| 76 | </xsl:element> |
---|
| 77 | </xsl:when> |
---|
| 78 | </xsl:choose> |
---|
| 79 | </xsl:for-each> |
---|
| 80 | <!-- ne plait pas à firefox ++ |
---|
| 81 | </xsl:element> |
---|
| 82 | --> |
---|
| 83 | <xsl:text>
</xsl:text> |
---|
[55] | 84 | <xsl:element name="html:label"> |
---|
[2] | 85 | <xsl:text>Since (YYYYMM) :</xsl:text> |
---|
| 86 | <xsl:text>
</xsl:text> |
---|
[55] | 87 | <xsl:element name="html:input"> |
---|
[2] | 88 | <xsl:attribute name="name">components_date</xsl:attribute> |
---|
| 89 | <xsl:attribute name="type">text</xsl:attribute> |
---|
[31] | 90 | <xsl:attribute name="value"><xsl:value-of select="$user/components/components_date"/></xsl:attribute> |
---|
[2] | 91 | </xsl:element> |
---|
| 92 | </xsl:element> |
---|
| 93 | </xsl:element> |
---|
| 94 | <xsl:text>
</xsl:text> |
---|
| 95 | </xsl:template> |
---|
| 96 | |
---|
| 97 | </xsl:stylesheet> |
---|