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