source: trunk/components_db.xsl @ 31

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

remove nemo in elements names and filenames

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2
3<!--
4module :
5creation des élements components de formulaire
6
7source :
8/usr/home/fplod/incas/bibnemo/src/bibnemomaf/components_db.xsl sur aedon.locean-ipsl.upmc.fr
9
10update :
11$Id$
12fplod 2007-06-08T09:07:12Z aedon.locean-ipsl.upmc.fr (Darwin)
13bug fix for components_date
14fplod 2007-05-18T10:25:06Z aedon.locean-ipsl.upmc.fr (Darwin)
15correction pour cause de dysfonctionnement sous firefox (mais ok sous safari) :
16Le 1er choix est modifié si on clique sur un des choix suivant
17fplod 2007-04-27T15:16:34Z aedon.locean-ipsl.upmc.fr (Darwin)
18ajout date
19fplod 2007-04-26T10:07:08Z aedon.locean-ipsl.upmc.fr (Darwin)
20creation
21-->
22
23<xsl:stylesheet
24 id="id" version="1.0"
25 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
26
27<xsl:template name="components">
28 <xsl:param name="user"/>
29 <xsl:param name="visu_modif"/>
30
31  <xsl:text>&#xA;</xsl:text>
32  <xsl:element name="fieldset">
33   <xsl:attribute name="id">components</xsl:attribute>
34   <xsl:text>&#xA;</xsl:text>
35   <xsl:element name="legend">
36    Used NEMO components
37   </xsl:element>
38   <xsl:text>&#xA;</xsl:text>
39   <!-- ne plait pas à firefox  ++
40    <xsl:element name="label">
41   -->
42    <xsl:for-each select="$user/components/component">
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:text>&#xA;</xsl:text>
49       <xsl:element name="input">
50        <xsl:attribute name="name">
51         <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
52        </xsl:attribute>
53        <xsl:attribute name="type">checkbox</xsl:attribute>
54        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute> 
55        <xsl:if test="$visu_modif= 'visu'"> 
56         <xsl:attribute name="readonly">1</xsl:attribute>
57        </xsl:if>
58        <xsl:if test="./value = 'yes'">
59         <xsl:attribute name="checked">1</xsl:attribute>
60        </xsl:if>
61        <xsl:value-of select="./name"/> 
62       </xsl:element>
63      </xsl:when>
64      <xsl:when  test="@code = 'zzz_other'">
65       <xsl:text>&#xA;</xsl:text>
66       <xsl:element name="label">
67       Other :
68        <xsl:text>&#xA;</xsl:text>
69        <xsl:element name="input">
70         <xsl:attribute name="name">
71          <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
72         </xsl:attribute>
73         <xsl:attribute name="type">text</xsl:attribute>
74          <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute> 
75        </xsl:element>
76       </xsl:element>
77      </xsl:when>
78     </xsl:choose>
79    </xsl:for-each>
80   <!-- ne plait pas à firefox  ++
81    </xsl:element>
82   -->
83   <xsl:text>&#xA;</xsl:text>
84   <xsl:element name="label">
85    <xsl:text>Since (YYYYMM) :</xsl:text>
86    <xsl:text>&#xA;</xsl:text>
87    <xsl:element name="input">
88     <xsl:attribute name="name">components_date</xsl:attribute>
89     <xsl:attribute name="type">text</xsl:attribute>
90     <xsl:attribute name="value"><xsl:value-of select="$user/components/components_date"/></xsl:attribute>
91    </xsl:element>
92   </xsl:element>
93  </xsl:element>
94  <xsl:text>&#xA;</xsl:text>
95</xsl:template>
96
97</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.