source: trunk/parameters_db.xsl

Last change on this file was 323, checked in by pinsard, 11 years ago

fix for XSL documentations

  • Property svn:keywords set to Id
File size: 2.5 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.. _parameters_db.xsl:
10
11=================
12parameters_db.xsl
13=================
14
15DESCRIPTION
16===========
17
18creation des élements parameters de formulaire
19
20EVOLUTIONS
21==========
22
23$Id$
24
25$URL$
26
27- fplod 20110624T143549Z aedon.locean-ipsl.upmc.fr (Darwin)
28
29  * creation
30
31-->
32
33<xsl:template name="parameters">
34 <xsl:param name="user"/>
35 <xsl:param name="author_id"/>
36 <xsl:param name="visu_modif"/>
37
38  <xsl:text>&#xA;</xsl:text>
39  <xsl:element name="html:fieldset">
40   <xsl:attribute name="xml:id">parameters_<xsl:value-of select="$author_id"/></xsl:attribute>
41   <xsl:text>&#xA;</xsl:text>
42   <xsl:element name="html:legend">
43    Used parameters
44   </xsl:element>
45   <xsl:text>&#xA;</xsl:text>
46   <!-- ne plait pas à firefox  ++
47    <xsl:element name="html:label">
48   -->
49    <xsl:for-each select="$user/parameters/parameter">
50     <xsl:sort order="ascending" data-type="text" select="@code"/>
51     <xsl:text>&#xA;</xsl:text>
52     <xsl:comment><xsl:value-of select="./value"/></xsl:comment>
53     <xsl:choose>
54      <xsl:when test="@code != 'zzz_other'">
55       <xsl:element name="html:input">
56        <xsl:attribute name="name">
57         <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
58        </xsl:attribute>
59        <xsl:attribute name="type">checkbox</xsl:attribute>
60        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute>
61        <xsl:if test="$visu_modif= 'visu'">
62         <xsl:attribute name="readonly">1</xsl:attribute>
63        </xsl:if>
64        <xsl:if test="./value = 'yes'">
65         <xsl:attribute name="checked">1</xsl:attribute>
66        </xsl:if>
67        <xsl:value-of select="./name"/>
68       </xsl:element>
69      </xsl:when>
70      <xsl:when  test="@code = 'zzz_other'">
71       <xsl:element name="html:label">
72        Other :
73        <xsl:element name="html:input">
74         <xsl:attribute name="name">
75          <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
76         </xsl:attribute>
77         <xsl:attribute name="type">text</xsl:attribute>
78         <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute>
79        </xsl:element>
80       </xsl:element>
81      </xsl:when>
82     </xsl:choose>
83    </xsl:for-each>
84   <!-- ne plait pas à firefox  ++
85    </xsl:element>
86   -->
87   <xsl:text>&#xA;</xsl:text>
88  </xsl:element>
89  <xsl:text>&#xA;</xsl:text>
90</xsl:template>
91
92</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.