source: trunk/parameters_db.xsl @ 140

Last change on this file since 140 was 112, checked in by pinsard, 13 years ago

add new informations about users

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