1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
2 | <xsl:stylesheet |
---|
3 | version="1.0" |
---|
4 | xmlns:d="http://docbook.org/ns/docbook" |
---|
5 | xmlns:html="http://www.w3.org/1999/xhtml" |
---|
6 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
7 | |
---|
8 | <!--rst |
---|
9 | |
---|
10 | .. _form_db.xsl: |
---|
11 | |
---|
12 | =========== |
---|
13 | form_db.xsl |
---|
14 | =========== |
---|
15 | |
---|
16 | creation du formulaire |
---|
17 | |
---|
18 | EVOLUTIONS |
---|
19 | ========== |
---|
20 | |
---|
21 | $Id$ |
---|
22 | |
---|
23 | - fplod 20110701T105735Z cratos.locean-ipsl.upmc.fr (Linux) |
---|
24 | |
---|
25 | * contact is no more define in makefile. see authorgroup/author[1]/email |
---|
26 | in main.xml |
---|
27 | |
---|
28 | - fplod 20110624T144535Z cratos.locean-ipsl.upmc.fr (Linux) |
---|
29 | |
---|
30 | * add parameters, regions, periods |
---|
31 | * only show template user characteristics : for example processors for NEMO |
---|
32 | but not for TROPFLUX |
---|
33 | |
---|
34 | - fplod 2008-09-17T09:49:51Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
35 | |
---|
36 | * project name from main.xml file instead of a fixed one |
---|
37 | |
---|
38 | - fplod 2008-04-29T08:57:43Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
39 | |
---|
40 | * chgt for dbk5 |
---|
41 | |
---|
42 | - fplod 2007-10-17T08:07:50Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
43 | |
---|
44 | * improve sort (diacriticals) |
---|
45 | |
---|
46 | - fplod 2007-05-18T14:56:32Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
47 | |
---|
48 | * modif gestion de id |
---|
49 | |
---|
50 | - fplod 2007-05-15T07:41:16Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
51 | |
---|
52 | * factorisation de biblioentry |
---|
53 | |
---|
54 | - fplod 2007-04-27T10:53:20Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
55 | |
---|
56 | * inclusion de php d'après http://www.cygwin.com/ml/docbook-apps/2005-q1/msg00484.html |
---|
57 | |
---|
58 | - fplod 2007-04-26T12:08:09Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
59 | |
---|
60 | * creation |
---|
61 | |
---|
62 | --> |
---|
63 | |
---|
64 | <xsl:include href="personal_db.xsl"/> |
---|
65 | <xsl:include href="compilers_db.xsl"/> |
---|
66 | <xsl:include href="platforms_db.xsl"/> |
---|
67 | <xsl:include href="regions_db.xsl"/> |
---|
68 | <xsl:include href="parameters_db.xsl"/> |
---|
69 | <xsl:include href="periods_db.xsl"/> |
---|
70 | <xsl:include href="components_db.xsl"/> |
---|
71 | <xsl:include href="comments_db.xsl"/> |
---|
72 | <xsl:include href="newreferences_db.xsl"/> |
---|
73 | <xsl:include href="processors_db.xsl"/> |
---|
74 | <xsl:include href="biblioentry_xml.xsl"/> |
---|
75 | |
---|
76 | <xsl:template name="form_db"> |
---|
77 | <!-- ++ template ou existant visu ou modif --> |
---|
78 | <xsl:param name="user"/> |
---|
79 | <xsl:param name="author_id"/> |
---|
80 | <xsl:param name="visu_modif"/> |
---|
81 | <xsl:param name="bibmode"/> |
---|
82 | |
---|
83 | <xsl:text>
</xsl:text> |
---|
84 | <xsl:element name="html:form"> |
---|
85 | <xsl:choose> |
---|
86 | <xsl:when test="$visu_modif= 'modif'"> |
---|
87 | <xsl:attribute name="action"> |
---|
88 | <xsl:text>mailto:</xsl:text><xsl:value-of select="document('main.xml')/d:article/d:info/d:authorgroup/d:author[1]/d:email"/><xsl:text>?subject=[</xsl:text><xsl:value-of select="document('main.xml')/d:article/d:title"/><xsl:text>]</xsl:text> |
---|
89 | <!-- value is completed in form_html.xsl because of php sequence ++ --> |
---|
90 | </xsl:attribute> |
---|
91 | <xsl:attribute name="method">post</xsl:attribute> |
---|
92 | <xsl:attribute name="enctype">text/plain</xsl:attribute> |
---|
93 | <xsl:text>
</xsl:text> |
---|
94 | <xsl:element name="html:input"> |
---|
95 | <xsl:attribute name="name">message</xsl:attribute> |
---|
96 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
97 | <xsl:attribute name="value"><xsl:text>Thank you for your contribution to </xsl:text><xsl:value-of select="document('main.xml')/d:article/d:title"/></xsl:attribute> |
---|
98 | </xsl:element> |
---|
99 | <xsl:text>
</xsl:text> |
---|
100 | <xsl:element name="html:input"> |
---|
101 | <xsl:attribute name="name">server</xsl:attribute> |
---|
102 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
103 | <!-- value is set in form_html.xsl because of php sequence ++ --> |
---|
104 | </xsl:element> |
---|
105 | <xsl:text>
</xsl:text> |
---|
106 | <xsl:element name="html:input"> |
---|
107 | <xsl:attribute name="name">phpversion</xsl:attribute> |
---|
108 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
109 | <!-- value is set in form_html.xsl because of php sequence ++ --> |
---|
110 | </xsl:element> |
---|
111 | <xsl:text>
</xsl:text> |
---|
112 | <xsl:element name="html:input"> |
---|
113 | <xsl:attribute name="name">timestamp</xsl:attribute> |
---|
114 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
115 | <!-- value is set in form_html.xsl because of php sequence ++ --> |
---|
116 | </xsl:element> |
---|
117 | </xsl:when> |
---|
118 | </xsl:choose> |
---|
119 | <xsl:text>
</xsl:text> |
---|
120 | <xsl:element name="html:input"> |
---|
121 | <xsl:attribute name="name">author_id</xsl:attribute> |
---|
122 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
123 | <xsl:attribute name="value"><xsl:value-of select="$author_id"/></xsl:attribute> |
---|
124 | </xsl:element> |
---|
125 | |
---|
126 | <xsl:call-template name="personal"> |
---|
127 | <xsl:with-param name="user" select="$user"/> |
---|
128 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
129 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
130 | </xsl:call-template> |
---|
131 | <xsl:if test="document('user.xml')/users/user[descendant::userid='template']/components"> |
---|
132 | <xsl:call-template name="components"> |
---|
133 | <xsl:with-param name="user" select="$user"/> |
---|
134 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
135 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
136 | </xsl:call-template> |
---|
137 | </xsl:if> |
---|
138 | <xsl:if test="document('user.xml')/users/user[descendant::userid='template']/platforms"> |
---|
139 | <xsl:call-template name="platforms"> |
---|
140 | <xsl:with-param name="user" select="$user"/> |
---|
141 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
142 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
143 | </xsl:call-template> |
---|
144 | </xsl:if> |
---|
145 | <xsl:if test="document('user.xml')/users/user[descendant::userid='template']/processors"> |
---|
146 | <xsl:call-template name="processors"> |
---|
147 | <xsl:with-param name="user" select="$user"/> |
---|
148 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
149 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
150 | </xsl:call-template> |
---|
151 | </xsl:if> |
---|
152 | <xsl:if test="document('user.xml')/users/user[descendant::userid='template']/compilers"> |
---|
153 | <xsl:call-template name="compilers"> |
---|
154 | <xsl:with-param name="user" select="$user"/> |
---|
155 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
156 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
157 | </xsl:call-template> |
---|
158 | </xsl:if> |
---|
159 | <xsl:if test="document('user.xml')/users/user[descendant::userid='template']/parameters"> |
---|
160 | <xsl:call-template name="parameters"> |
---|
161 | <xsl:with-param name="user" select="$user"/> |
---|
162 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
163 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
164 | </xsl:call-template> |
---|
165 | </xsl:if> |
---|
166 | <xsl:if test="document('user.xml')/users/user[descendant::userid='template']/regions"> |
---|
167 | <xsl:call-template name="regions"> |
---|
168 | <xsl:with-param name="user" select="$user"/> |
---|
169 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
170 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
171 | </xsl:call-template> |
---|
172 | </xsl:if> |
---|
173 | <xsl:if test="document('user.xml')/users/user[descendant::userid='template']/periods"> |
---|
174 | <xsl:call-template name="periods"> |
---|
175 | <xsl:with-param name="user" select="$user"/> |
---|
176 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
177 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
178 | </xsl:call-template> |
---|
179 | </xsl:if> |
---|
180 | <xsl:choose> |
---|
181 | <xsl:when test="$bibmode= 'yes'"> |
---|
182 | <xsl:text>
</xsl:text> |
---|
183 | <xsl:element name="orderedlist"> |
---|
184 | <!-- |
---|
185 | <xsl:for-each select="/descendant::d:biblioentry[descendant::d:author=$author_name]"> |
---|
186 | --> |
---|
187 | <xsl:for-each select="//d:biblioentry"> |
---|
188 | <xsl:sort order="descending" data-type="number" select="./d:biblioset/d:pubdate"/> |
---|
189 | |
---|
190 | <xsl:for-each select="descendant::d:author"> |
---|
191 | <xsl:sort order="ascending" data-type="text" select="translate(./d:personname,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/> |
---|
192 | <xsl:variable name="author_id2"> |
---|
193 | <xsl:call-template name="surname_id"> |
---|
194 | <xsl:with-param name="surname" select="d:personname/d:surname"/> |
---|
195 | </xsl:call-template> |
---|
196 | <xsl:text>_</xsl:text> |
---|
197 | <xsl:call-template name="firstname_id"> |
---|
198 | <xsl:with-param name="firstname" select="d:personname/d:firstname"/> |
---|
199 | </xsl:call-template> |
---|
200 | </xsl:variable> |
---|
201 | <!-- |
---|
202 | <xsl:message terminate="no"> |
---|
203 | ref #<xsl:value-of select="position()"/> |
---|
204 | _id appel <xsl:value-of select="$author_id"/> |
---|
205 | _id fabrique <xsl:value-of select="$author_id2"/> |
---|
206 | egal ? <xsl:value-of select="$author_id2 = $author_id"/> |
---|
207 | </xsl:message> |
---|
208 | --> |
---|
209 | <xsl:if test="$author_id2 = $author_id"> |
---|
210 | <xsl:call-template name="one_biblioentry"> |
---|
211 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
212 | <xsl:with-param name="my_biblioentry" select="ancestor::d:biblioentry"/> |
---|
213 | <!-- ++ <xsl:with-param name="id" select="@xml:id"/> --> |
---|
214 | </xsl:call-template> |
---|
215 | |
---|
216 | </xsl:if> |
---|
217 | </xsl:for-each> |
---|
218 | </xsl:for-each> |
---|
219 | </xsl:element> |
---|
220 | </xsl:when> |
---|
221 | </xsl:choose> |
---|
222 | <xsl:call-template name="comments"> |
---|
223 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
224 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
225 | </xsl:call-template> |
---|
226 | <xsl:call-template name="newreferences"> |
---|
227 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
228 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
229 | </xsl:call-template> |
---|
230 | |
---|
231 | <xsl:choose> |
---|
232 | <xsl:when test="$visu_modif= 'modif'"> |
---|
233 | <xsl:text>
</xsl:text> |
---|
234 | <xsl:element name="html:input"> |
---|
235 | <xsl:attribute name="type">submit</xsl:attribute> |
---|
236 | <xsl:attribute name="value">Mail</xsl:attribute> |
---|
237 | </xsl:element> |
---|
238 | <xsl:text>
</xsl:text> |
---|
239 | <xsl:element name="html:input"> |
---|
240 | <xsl:attribute name="type">reset</xsl:attribute> |
---|
241 | <xsl:attribute name="value">reset</xsl:attribute> |
---|
242 | </xsl:element> |
---|
243 | </xsl:when> |
---|
244 | </xsl:choose> |
---|
245 | </xsl:element> |
---|
246 | </xsl:template> |
---|
247 | |
---|
248 | </xsl:stylesheet> |
---|