source: trunk/platforms_db.xsl

Last change on this file was 355, checked in by pinsard, 10 years ago

fix thanks to coding rules; typo; dupe empty lines

  • Property svn:keywords set to Id
File size: 2.8 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<!--rst
8
9.. _platforms_db.xsl:
10
11================
12platforms_db.xsl
13================
14
15DESCRIPTION
16===========
17
18creation des élements platforms de formulaire
19
20EVOLUTIONS
21==========
22
23$Id$
24
25- fplod 2008-04-29T09:05:29Z aedon.locean-ipsl.upmc.fr (Darwin)
26
27  * chgt for dbk5
28
29- fplod 2007-05-18T10:25:06Z aedon.locean-ipsl.upmc.fr (Darwin)
30
31  * correction pour cause de dysfonctionnement sous firefox (mais ok sous safari) :
32    Le 1er choix est modifié si on clique sur un des choix suivant
33
34- fplod 2007-04-26T10:14:40Z aedon.locean-ipsl.upmc.fr (Darwin)
35
36  * creation
37
38-->
39
40<xsl:template name="platforms">
41 <xsl:param name="user"/>
42 <xsl:param name="author_id"/>
43 <xsl:param name="visu_modif"/>
44
45  <xsl:text>&#xA;</xsl:text>
46  <xsl:element name="html:fieldset">
47   <xsl:attribute name="xml:id">platforms_<xsl:value-of select="$author_id"/></xsl:attribute>
48   <xsl:text>&#xA;</xsl:text>
49   <xsl:element name="html:legend">
50    Used platforms
51   </xsl:element>
52   <xsl:text>&#xA;</xsl:text>
53   <!-- ne plait pas à firefox  ++
54    <xsl:element name="html:label">
55   -->
56    <xsl:for-each select="$user/platforms/platform">
57     <xsl:sort order="ascending" data-type="text" select="@code"/>
58     <xsl:text>&#xA;</xsl:text>
59     <xsl:comment><xsl:value-of select="./value"/></xsl:comment>
60     <xsl:choose>
61      <xsl:when test="@code != 'zzz_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">checkbox</xsl:attribute>
67        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute>
68        <xsl:if test="$visu_modif= 'visu'">
69         <xsl:attribute name="readonly">1</xsl:attribute>
70        </xsl:if>
71        <xsl:if test="./value = 'yes'">
72         <xsl:attribute name="checked">1</xsl:attribute>
73        </xsl:if>
74        <xsl:value-of select="./name"/>
75       </xsl:element>
76      </xsl:when>
77      <xsl:when  test="@code = 'zzz_other'">
78       <xsl:element name="html:label">
79        Other :
80        <xsl:element name="html:input">
81         <xsl:attribute name="name">
82          <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
83         </xsl:attribute>
84         <xsl:attribute name="type">text</xsl:attribute>
85         <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute>
86        </xsl:element>
87       </xsl:element>
88      </xsl:when>
89     </xsl:choose>
90    </xsl:for-each>
91   <!-- ne plait pas à firefox  ++
92    </xsl:element>
93   -->
94   <xsl:text>&#xA;</xsl:text>
95  </xsl:element>
96  <xsl:text>&#xA;</xsl:text>
97</xsl:template>
98
99</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.