[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 compilers de formulaire |
---|
| 10 | |
---|
| 11 | update : |
---|
[33] | 12 | $Id$ |
---|
[55] | 13 | fplod 2008-04-29T09:03:58Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 14 | chgt for dbk5 |
---|
[2] | 15 | fplod 2007-05-18T10:25:06Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 16 | correction pour cause de dysfonctionnement sous firefox (mais ok sous safari) : |
---|
| 17 | Le 1er choix est modifi<E9> si on clique sur un des choix suivant |
---|
| 18 | fplod 2007-04-26T10:13:37Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 19 | creation |
---|
| 20 | --> |
---|
| 21 | |
---|
| 22 | <xsl:template name="compilers"> |
---|
[31] | 23 | <xsl:param name="user"/> |
---|
[55] | 24 | <xsl:param name="author_id"/> |
---|
[2] | 25 | <xsl:param name="visu_modif"/> |
---|
| 26 | |
---|
| 27 | <xsl:text>
</xsl:text> |
---|
[55] | 28 | <xsl:element name="html:fieldset"> |
---|
| 29 | <xsl:attribute name="xml:id">compilers_<xsl:value-of select="$author_id"/></xsl:attribute> |
---|
[2] | 30 | <xsl:text>
</xsl:text> |
---|
| 31 | <xsl:text>
</xsl:text> |
---|
[55] | 32 | <xsl:element name="html:legend"> |
---|
[2] | 33 | Used compilers |
---|
| 34 | </xsl:element> |
---|
| 35 | <xsl:text>
</xsl:text> |
---|
| 36 | <xsl:text>
</xsl:text> |
---|
| 37 | <!-- ne plait pas à firefox ++ |
---|
[55] | 38 | <xsl:element name="html:label"> |
---|
[2] | 39 | --> |
---|
[31] | 40 | <xsl:for-each select="$user/compilers/compiler"> |
---|
[2] | 41 | <xsl:sort order="ascending" data-type="text" select="@code"/> |
---|
| 42 | <xsl:text>
</xsl:text> |
---|
| 43 | <xsl:comment><xsl:value-of select="./value"/></xsl:comment> |
---|
| 44 | <xsl:choose> |
---|
| 45 | <xsl:when test="@code != 'zzz_other'"> |
---|
| 46 | <xsl:text>
</xsl:text> |
---|
[55] | 47 | <xsl:element name="html:input"> |
---|
[2] | 48 | <xsl:attribute name="name"> |
---|
| 49 | <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/> |
---|
| 50 | </xsl:attribute> |
---|
| 51 | <xsl:attribute name="type">checkbox</xsl:attribute> |
---|
| 52 | <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute> |
---|
| 53 | <xsl:if test="$visu_modif= 'visu'"> |
---|
| 54 | <xsl:attribute name="readonly">1</xsl:attribute> |
---|
| 55 | </xsl:if> |
---|
| 56 | <xsl:if test="./value = 'yes'"> |
---|
| 57 | <xsl:attribute name="checked">1</xsl:attribute> |
---|
| 58 | </xsl:if> |
---|
| 59 | <xsl:value-of select="./name"/> |
---|
| 60 | </xsl:element> |
---|
| 61 | </xsl:when> |
---|
| 62 | <xsl:when test="@code = 'zzz_other'"> |
---|
| 63 | <xsl:text>
</xsl:text> |
---|
[55] | 64 | <xsl:element name="html:label"> |
---|
[2] | 65 | Other : |
---|
| 66 | <xsl:text>
</xsl:text> |
---|
[55] | 67 | <xsl:element name="html:input"> |
---|
[2] | 68 | <xsl:attribute name="name"> |
---|
| 69 | <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/> |
---|
| 70 | </xsl:attribute> |
---|
| 71 | <xsl:attribute name="type">text</xsl:attribute> |
---|
| 72 | <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute> |
---|
| 73 | </xsl:element> |
---|
| 74 | </xsl:element> |
---|
| 75 | </xsl:when> |
---|
| 76 | </xsl:choose> |
---|
| 77 | </xsl:for-each> |
---|
| 78 | <!-- ne plait pas à firefox ++ |
---|
| 79 | </xsl:element> |
---|
| 80 | --> |
---|
| 81 | <xsl:text>
</xsl:text> |
---|
| 82 | </xsl:element> |
---|
| 83 | <xsl:text>
</xsl:text> |
---|
| 84 | </xsl:template> |
---|
| 85 | </xsl:stylesheet> |
---|