source: trunk/platforms_db.xsl @ 164

Last change on this file since 164 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
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet
3version="1.0"
4xmlns:html="http://www.w3.org/1999/xhtml"
5xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6
7<!--
8module :
9creation des élements platforms de formulaire
10
11update :
12$Id$
13fplod 2008-04-29T09:05:29Z aedon.locean-ipsl.upmc.fr (Darwin)
14chgt for dbk5
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">
23 <xsl:param name="user"/>
24 <xsl:param name="author_id"/>
25 <xsl:param name="visu_modif"/>
26
27  <xsl:text>&#xA;</xsl:text>
28  <xsl:element name="html:fieldset">
29   <xsl:attribute name="xml:id">platforms_<xsl:value-of select="$author_id"/></xsl:attribute>
30   <xsl:text>&#xA;</xsl:text>
31   <xsl:element name="html:legend">
32    Used platforms
33   </xsl:element>
34   <xsl:text>&#xA;</xsl:text>
35   <!-- ne plait pas à firefox  ++
36    <xsl:element name="html:label">
37   -->
38    <xsl:for-each select="$user/platforms/platform">
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'">
44       <xsl:element name="html:input">
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>
49        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute>
50        <xsl:if test="$visu_modif= 'visu'">
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>
56        <xsl:value-of select="./name"/>
57       </xsl:element>
58      </xsl:when>
59      <xsl:when  test="@code = 'zzz_other'">
60       <xsl:element name="html:label">
61        Other :
62        <xsl:element name="html:input">
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>
67         <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute>
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.