source: trunk/platforms_db.xsl @ 110

Last change on this file since 110 was 76, checked in by pinsard, 16 years ago

no more NEMO reference in XSL files; project information (name and home page are in main.xml

  • Property svn:keywords set to Id
File size: 2.7 KB
RevLine 
[2]1<?xml version="1.0" encoding="iso-8859-1"?>
[55]2<xsl:stylesheet
3version="1.0"
4xmlns:html="http://www.w3.org/1999/xhtml"
5xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
[2]6
7<!--
8module :
9creation des élements platforms de formulaire
10
11update :
[33]12$Id$
[55]13fplod 2008-04-29T09:05:29Z aedon.locean-ipsl.upmc.fr (Darwin)
14chgt for dbk5
[2]15fplod 2007-05-18T10:25:06Z aedon.locean-ipsl.upmc.fr (Darwin)
16correction pour cause de dysfonctionnement sous firefox (mais ok sous safari) :
17Le 1er choix est modifié si on clique sur un des choix suivant
18fplod 2007-04-26T10:14:40Z aedon.locean-ipsl.upmc.fr (Darwin)
19creation
20-->
21
22<xsl:template name="platforms">
[31]23 <xsl:param name="user"/>
[55]24 <xsl:param name="author_id"/>
[2]25 <xsl:param name="visu_modif"/>
26
27  <xsl:text>&#xA;</xsl:text>
[55]28  <xsl:element name="html:fieldset">
29   <xsl:attribute name="xml:id">platforms_<xsl:value-of select="$author_id"/></xsl:attribute>
[2]30   <xsl:text>&#xA;</xsl:text>
[55]31   <xsl:element name="html:legend">
[2]32    Used platforms
33   </xsl:element>
34   <xsl:text>&#xA;</xsl:text>
35   <!-- ne plait pas à firefox  ++
[55]36    <xsl:element name="html:label">
[2]37   -->
[31]38    <xsl:for-each select="$user/platforms/platform">
[2]39     <xsl:sort order="ascending" data-type="text" select="@code"/>
40     <xsl:text>&#xA;</xsl:text>
41     <xsl:comment><xsl:value-of select="./value"/></xsl:comment>
42     <xsl:choose>
43      <xsl:when test="@code != 'zzz_other'">
[55]44       <xsl:element name="html:input">
[2]45        <xsl:attribute name="name">
46         <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
47        </xsl:attribute>
48        <xsl:attribute name="type">checkbox</xsl:attribute>
[76]49        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute>
50        <xsl:if test="$visu_modif= 'visu'">
[2]51         <xsl:attribute name="readonly">1</xsl:attribute>
52        </xsl:if>
53        <xsl:if test="./value = 'yes'">
54         <xsl:attribute name="checked">1</xsl:attribute>
55        </xsl:if>
[76]56        <xsl:value-of select="./name"/>
[2]57       </xsl:element>
58      </xsl:when>
59      <xsl:when  test="@code = 'zzz_other'">
[55]60       <xsl:element name="html:label">
[2]61        Other :
[55]62        <xsl:element name="html:input">
[2]63         <xsl:attribute name="name">
64          <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
65         </xsl:attribute>
66         <xsl:attribute name="type">text</xsl:attribute>
[76]67         <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute>
[2]68        </xsl:element>
69       </xsl:element>
70      </xsl:when>
71     </xsl:choose>
72    </xsl:for-each>
73   <!-- ne plait pas à firefox  ++
74    </xsl:element>
75   -->
76   <xsl:text>&#xA;</xsl:text>
77  </xsl:element>
78  <xsl:text>&#xA;</xsl:text>
79</xsl:template>
80
81</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.