source: trunk/regions_db.xsl @ 164

Last change on this file since 164 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
RevLine 
[2]1<?xml version="1.0" encoding="iso-8859-1"?>
[55]2<xsl:stylesheet
3version="1.0"
4xmlns:html="http://www.w3.org/1999/xhtml"
5xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
[2]6
[112]7<!--rst
[2]8
[112]9DESCRIPTION
10===========
11
12creation des élements regions de formulaire
13
14EVOLUTIONS
15==========
16
[33]17$Id$
[112]18$URL$
19
20- fplod 20110624T143549Z aedon.locean-ipsl.upmc.fr (Darwin)
21
22  * creation
23
[2]24-->
25
[112]26<xsl:template name="regions">
[31]27 <xsl:param name="user"/>
[55]28 <xsl:param name="author_id"/>
[2]29 <xsl:param name="visu_modif"/>
30
31  <xsl:text>&#xA;</xsl:text>
[55]32  <xsl:element name="html:fieldset">
[112]33   <xsl:attribute name="xml:id">regions_<xsl:value-of select="$author_id"/></xsl:attribute>
[2]34   <xsl:text>&#xA;</xsl:text>
[55]35   <xsl:element name="html:legend">
[112]36    Used regions
[2]37   </xsl:element>
38   <xsl:text>&#xA;</xsl:text>
39   <!-- ne plait pas à firefox  ++
[55]40    <xsl:element name="html:label">
[2]41   -->
[112]42    <xsl:for-each select="$user/regions/region">
[2]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'">
[55]48       <xsl:element name="html:input">
[2]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>
[76]53        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute>
54        <xsl:if test="$visu_modif= 'visu'">
[2]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>
[76]60        <xsl:value-of select="./name"/>
[2]61       </xsl:element>
62      </xsl:when>
63      <xsl:when  test="@code = 'zzz_other'">
[55]64       <xsl:element name="html:label">
[2]65        Other :
[55]66        <xsl:element name="html:input">
[2]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>
[76]71         <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute>
[2]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.