/[qa]/trunk/pts/www/xsl/pts.xsl
ViewVC logotype

Contents of /trunk/pts/www/xsl/pts.xsl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 372 - (show annotations) (download) (as text)
Wed Sep 4 07:24:28 2002 UTC (10 years, 9 months ago) by hertzog
File MIME type: application/xml
File size: 17185 byte(s)
* Use the debcheck availabilty info to show the link only when needed.
* Put a link to qa.debian.org/developer.php?login=email on maintainer's
  name.
* The CGI checks for the presence of @ in the email (refuses the
  "your email" default value).
* Other misc fixes.
1 <?xml version="1.0" encoding="ISO-8859-1" ?>
2
3 <!--
4 # Copyright 2002 Raphaël Hertzog
5 # This file is distributed under the terms of the General Public License
6 # version 2 or (at your option) any later version.
7 -->
8
9 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
10
11 <xsl:output encoding="ISO-8859-1" method="html"/>
12
13 <xsl:param name="package"/>
14 <xsl:param name="dir"/>
15 <xsl:param name="date"/>
16 <xsl:param name="hasstable" select="''"/>
17 <xsl:param name="hastesting" select="''"/>
18 <xsl:param name="hasunstable" select="''"/>
19 <xsl:param name="hasexperimental" select="''"/>
20 <xsl:param name="hasother" select="''"/>
21 <xsl:param name="hass-p-u" select="''"/>
22 <xsl:param name="hast-p-u" select="''"/>
23 <xsl:param name="hasstable-security" select="''"/>
24 <xsl:param name="hastesting-security" select="''"/>
25 <xsl:param name="hasnews" select="''"/>
26 <xsl:param name="hasexcuse" select="''"/>
27
28 <xsl:variable name="other" select="document(concat('../base/', $dir, '/other.xml'))/other"/>
29
30 <!-- Those variables controls the todo and problem item concerning
31 standards-version not being up to date -->
32 <xsl:variable name="lastsv" select="'3.5.7'"/>
33 <xsl:variable name="lastmajorsv" select="'3.'"/>
34 <!-- More variables -->
35 <xsl:variable name="ptsurl" select="'http://pts.debian.net'"/>
36
37 <!-- Named templates aka functions -->
38 <xsl:template name="mirror">
39 <xsl:choose>
40 <xsl:when test="contains(source/section, 'non-US')">
41 <xsl:text>http://non-us.debian.org/debian-non-US</xsl:text>
42 </xsl:when>
43 <xsl:otherwise>
44 <xsl:text>http://http.us.debian.org/debian</xsl:text>
45 </xsl:otherwise>
46 </xsl:choose>
47 </xsl:template>
48
49 <xsl:template name="outputitem">
50 <xsl:choose>
51 <xsl:when test="@url">
52 <li><xsl:if test="@date">
53 <xsl:text>[</xsl:text>
54 <xsl:value-of select="@date"/>
55 <xsl:text>] </xsl:text>
56 </xsl:if><a href="{@url}"><xsl:value-of select="text()"/></a></li>
57 </xsl:when>
58 <xsl:otherwise>
59 <li><xsl:if test="@date">
60 <xsl:text>[</xsl:text>
61 <xsl:value-of select="@date"/>
62 <xsl:text>] </xsl:text>
63 </xsl:if><xsl:value-of select="text()"/></li>
64 </xsl:otherwise>
65 </xsl:choose>
66 </xsl:template>
67
68 <!-- All the work is done in a single template -->
69 <xsl:template match="source">
70
71 <!-- Start of html -->
72 <html>
73 <head>
74 <meta name="ROBOTS" content="NOFOLLOW"/>
75 <link rel="stylesheet" href="../common/pts.css"/>
76 <title>Overview of <xsl:value-of select="$package"/> source package</title>
77 </head>
78 <body>
79
80 <form onSubmit="window.location.pathname='/'+src.value; return false" style="float: right;">
81 Jump to package : <br/>
82 <input type="text" name="src" value=""/>
83 </form>
84 <h1>Overview of <xsl:value-of select="$package"/> source package</h1>
85
86 <table class="containertable">
87 <tr class="containerrow" valign="top">
88 <td class="containercell">
89 <!-- LEFT SIDE -->
90 <table class="lefttable">
91 <tr class="titlerow">
92 <td class="titlecell" colspan="2">
93 General Information
94 </td></tr>
95 <tr class="normalrow">
96 <td class="labelcell">Last version</td>
97 <td class="contentcell"><xsl:value-of select="version"/></td>
98 </tr>
99 <xsl:if test="@release!='unstable'">
100 <tr class="normalrow">
101 <td class="labelcell">Distribution</td>
102 <td class="contentcell"><xsl:value-of select="@release"/></td>
103 </tr>
104 </xsl:if>
105 <tr class="normalrow">
106 <td class="labelcell">Maintainer</td>
107 <td class="contentcell"><a class="email" href="http://qa.debian.org/developer.php?login={maintainer/email}">
108 <xsl:value-of select="maintainer/name"/></a> [<a class="email" href="mailto:{maintainer/email}">mail</a>]</td>
109 </tr>
110 <tr class="normalrow">
111 <td class="labelcell"><a href="http://www.debian.org/doc/manuals/developers-reference/ch-pkgs.en.html#s-collaborative-maint">Co-Maintainers</a></td>
112 <td class="contentcell">
113 <xsl:if test="uploaders">
114 <xsl:for-each select="uploaders/item">
115 <a class="email" href="http://qa.debian.org/developer.php?login={email}"><xsl:value-of select="name"/></a> [<a class="email" href="mailto:{email}">mail</a>]<br/>
116 </xsl:for-each>
117 </xsl:if>
118 <xsl:if test="not(uploaders)">
119 <a class="none" title="You should find some co-maintainers ..." name="fake">None</a>
120 </xsl:if>
121 </td></tr>
122 <tr class="normalrow">
123 <td class="labelcell">Standards-Version</td>
124 <td class="contentcell"><xsl:value-of select="standards-version"/></td>
125 </tr>
126
127 <tr class="titlerow">
128 <td class="titlecell" colspan="2">
129 Bugs Count
130 </td></tr>
131 <tr class="normalrow">
132 <td class="labelcell">All bugs</td>
133 <td class="contentcell">
134 <a href="http://bugs.debian.org/src:{$package}"><xsl:if test="$hasother">
135 <xsl:value-of select="$other/bugs/@all"/>
136 </xsl:if></a>
137 </td>
138 </tr>
139 <tr class="normalrow">
140 <td class="labelcell">Release Critical</td>
141 <td class="contentcell">
142 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=critical&amp;sev-inc=grave&amp;sev-inc=serious"><xsl:if test="$hasother">
143 <xsl:value-of select="$other/bugs/@rc"/>
144 </xsl:if></a>
145 </td>
146 </tr>
147 <tr class="normalrow">
148 <td class="labelcell">Important and Normal</td>
149 <td class="contentcell">
150 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=important&amp;sev-inc=normal"><xsl:if test="$hasother">
151 <xsl:value-of select="$other/bugs/@normal"/>
152 </xsl:if></a>
153 </td>
154 </tr>
155 <tr class="normalrow">
156 <td class="labelcell">Minor and Wishlist</td>
157 <td class="contentcell">
158 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=minor&amp;sev-inc=wishlist"><xsl:if test="$hasother">
159 <xsl:value-of select="$other/bugs/@wishlist"/>
160 </xsl:if></a>
161 </td>
162 </tr>
163 <tr class="normalrow">
164 <td class="labelcell">Fixed and Pending</td>
165 <td class="contentcell">
166 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;archive=no&amp;pend-inc=pending-fixed&amp;pend-inc=fixed"><xsl:if test="$hasother">
167 <xsl:value-of select="$other/bugs/@fixed"/>
168 </xsl:if></a>
169 </td>
170 </tr>
171
172 <tr class="titlerow">
173 <td class="titlecell" colspan="2">
174 Subcription - <a class="titlelink" href="http://www.debian.org/doc/manuals/developers-reference/ch-resources.en.html#s-pkg-tracking-system">Package Tracking System</a>
175 </td></tr>
176 <tr class="normalrow">
177 <td class="labelcell">Subscribers count</td>
178 <td class="contentcell"><xsl:if test="$hasother">
179 <xsl:value-of select="$other/pts/@count"/>
180 </xsl:if></td>
181 </tr>
182 <tr class="normalrow">
183 <td class="contentcell" colspan="2">
184 <form method="post" action="{$ptsurl}/common/pts.cgi">
185 <input type="hidden" name="package" value="{$package}"/>
186 <select name="what">
187 <option value="subscribe">Subscribe</option>
188 <option value="unsubscribe">Unsubscribe</option>
189 <option value="advanced">Advanced mode</option>
190 </select>
191 <input type="text" name="email" size="15" value="your email" onFocus="if(email.value=='your email'){{email.value=''}}"/>
192 <input type="submit" name="submit" value="Send"/>
193 </form>
194 </td>
195 </tr>
196
197 <tr class="titlerow">
198 <td class="titlecell" colspan="2">
199 Binary Package(s)
200 </td></tr>
201 <tr class="normalrow">
202 <td class="normalcell" colspan="2" style="text-align: left">
203 <xsl:for-each select="binary/item">
204 <xsl:sort select="text()"/>
205 <xsl:variable name="pkg" select="text()"/>
206 <li>
207 <a href="http://packages.debian.org/{text()}"><xsl:value-of select="text()"/></a>
208 <span style="font-size: 70%">
209 (<a href="http://bugs.debian.org/{text()}"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@all"/> bugs</a>:
210 <a title="critical, grave and serious" href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&amp;data={text()}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=critical&amp;sev-inc=grave&amp;sev-inc=serious"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@rc"/></a>,
211 <a title="important and normal" href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&amp;data={text()}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=important&amp;sev-inc=normal"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@normal"/></a>,
212 <a title="wishlist and minor" href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&amp;data={text()}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=minor&amp;sev-inc=wishlist"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@wishlist"/></a>,
213 <a title="pending and fixed" href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&amp;data={text()}&amp;archive=no&amp;pend-inc=pending-fixed&amp;pend-inc=fixed"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@fixed"/></a>)
214 </span>
215 </li>
216 </xsl:for-each>
217 </td></tr>
218
219 <tr class="titlerow">
220 <td class="titlecell" colspan="2">
221 Other available versions
222 </td></tr>
223 <xsl:if test="$hasexperimental">
224 <tr class="normalrow">
225 <td class="labelcell">Experimental</td>
226 <td class="contentcell">
227 <xsl:value-of select="document(concat('../base/', $dir, '/experimental.xml'))/source/version"/>
228 </td>
229 </tr>
230 </xsl:if>
231 <xsl:if test="$hasstable-security">
232 <tr class="normalrow">
233 <td class="labelcell">Security Updates (stable)</td>
234 <td class="contentcell">
235 <xsl:value-of select="document(concat('../base/', $dir, '/stable-security.xml'))/source/version"/>
236 </td>
237 </tr>
238 </xsl:if>
239 <xsl:if test="$hastesting-security">
240 <tr class="normalrow">
241 <td class="labelcell">Security Updates (testing)</td>
242 <td class="contentcell">
243 <xsl:value-of select="document(concat('../base/', $dir, '/testing-security.xml'))/source/version"/>
244 </td>
245 </tr>
246 </xsl:if>
247 <xsl:if test="$hastesting">
248 <tr class="normalrow">
249 <td class="labelcell">Testing</td>
250 <td class="contentcell">
251 <xsl:value-of select="document(concat('../base/', $dir, '/testing.xml'))/source/version"/>
252 </td>
253 </tr>
254 </xsl:if>
255 <xsl:if test="$hast-p-u">
256 <tr class="normalrow">
257 <td class="labelcell">Testing Proposed Updates</td>
258 <td class="contentcell">
259 <xsl:value-of select="document(concat('../base/', $dir, '/t-p-u.xml'))/source/version"/>
260 </td>
261 </tr>
262 </xsl:if>
263 <xsl:if test="$hasstable">
264 <tr class="normalrow">
265 <td class="labelcell">Stable</td>
266 <td class="contentcell">
267 <xsl:value-of select="document(concat('../base/', $dir, '/stable.xml'))/source/version"/>
268 </td>
269 </tr>
270 </xsl:if>
271 <xsl:if test="$hass-p-u">
272 <tr class="normalrow">
273 <td class="labelcell">Stable Proposed Updates</td>
274 <td class="contentcell">
275 <xsl:value-of select="document(concat('../base/', $dir, '/s-p-u.xml'))/source/version"/>
276 </td>
277 </tr>
278 </xsl:if>
279
280 <tr class="titlerow">
281 <td class="titlecell" colspan="2">
282 Other links
283 </td></tr>
284 <tr>
285 <td class="contentcell" colspan="2" style="text-align: left">
286 <xsl:if test="architecture!='all'">
287 <li><a href="http://buildd.debian.org/build.php?pkg={$package}">Buildd logs</a></li>
288 </xsl:if>
289 <xsl:if test="$hasunstable and $other/debcheck/@unstable='yes'">
290 <li><a href="http://qa.debian.org/debcheck.php?dist=unstable&amp;package={$package}">Debcheck on unstable</a></li>
291 </xsl:if>
292 <xsl:if test="$hastesting and $other/debcheck/@testing='yes'">
293 <li><a href="http://qa.debian.org/debcheck.php?dist=testing&amp;package={$package}">Debcheck on testing</a></li>
294 </xsl:if>
295 <xsl:if test="$hasstable and $other/debcheck/@stable='yes'">
296 <li><a href="http://qa.debian.org/debcheck.php?dist=stable&amp;package={$package}">Debcheck on stable</a></li>
297 </xsl:if>
298 </td>
299 </tr>
300
301 <tr class="titlerow">
302 <td class="titlecell" colspan="2">
303 <xsl:element name="a">
304 <xsl:attribute name="class">
305 <xsl:text>titlelink</xsl:text>
306 </xsl:attribute>
307 <xsl:attribute name="href">
308 <xsl:call-template name="mirror"/>
309 <xsl:text>/</xsl:text>
310 <xsl:value-of select="directory"/>
311 <xsl:text>/</xsl:text>
312 </xsl:attribute>
313 <xsl:text>Source files</xsl:text>
314 </xsl:element>
315 </td></tr>
316 <tr class="normalrow">
317 <td class="normalcell" colspan="2" style="text-align: left">
318 <xsl:for-each select="files/item">
319 <li>
320 <xsl:element name="a">
321 <xsl:attribute name="class">srcfile</xsl:attribute>
322 <xsl:attribute name="href">
323 <xsl:call-template name="mirror"/>
324 <xsl:text>/</xsl:text>
325 <xsl:value-of select="../../directory"/>
326 <xsl:text>/</xsl:text>
327 <xsl:value-of select="filename"/>
328 </xsl:attribute>
329 <xsl:attribute name="title">
330 <xsl:value-of select="size"/>
331 <xsl:text> bytes</xsl:text>
332 </xsl:attribute>
333 <xsl:value-of select="filename"/>
334 </xsl:element>
335 </li>
336 </xsl:for-each>
337 </td></tr>
338
339 </table>
340 <!-- END LEFT SIDE -->
341 </td><td class="containercell">
342 <!-- RIGHT SIDE -->
343 <table class="righttable">
344
345
346 <!-- Todo list -->
347 <xsl:variable name="todo">
348 <xsl:if test="@nmu">
349 <li>Incorporate and acknowledge the changes from the non maintainer upload.</li>
350 </xsl:if>
351 <xsl:if test="not(uploaders)and(priority='standard' or priority='required' or priority='important')">
352 <li>The package is of priority standard or higher, you should really find some co-maintainers.</li>
353 </xsl:if>
354 <xsl:if test="not(starts-with(standards-version, $lastsv))">
355 <li>You should update the package to follow the last version of
356 Debian Policy (Standards-Version
357 <xsl:value-of select="$lastsv"/> instead of
358 <xsl:value-of select="standards-version"/>).</li>
359 </xsl:if>
360 <xsl:if test="$hasother">
361 <xsl:for-each select="$other/todo/item">
362 <xsl:call-template name="outputitem"/>
363 </xsl:for-each>
364 </xsl:if>
365 </xsl:variable>
366 <xsl:if test="count($todo)>0 and string($todo)!=''">
367 <tr class="titlerow">
368 <td class="titlecell" style="background-color: blue">
369 Todo
370 </td></tr>
371 <tr class="normalrow">
372 <td class="contentcell2"><xsl:copy-of select="$todo"/>
373 </td>
374 </tr>
375 </xsl:if>
376
377 <!-- List of problems -->
378 <xsl:variable name="problems">
379 <xsl:if test="$hasexcuse and document(concat('../base/', $dir, '/excuse.xml'))/excuse/@problematic">
380 <li>The package has not yet entered <a
381 href="http://ftp-master.debian.org/testing/update_excuses.html#{$package}">testing</a>
382 even if the <xsl:value-of select="document(concat('../base/', $dir, '/excuse.xml'))/excuse/@limit"/>-day
383 delay is over.</li>
384 </xsl:if>
385 <xsl:if test="not(starts-with(standards-version, $lastmajorsv))">
386 <li>The package is severly out of date with respect to the Debian
387 Policy. Latest version is <xsl:value-of select="$lastsv"/>
388 and your package only follows
389 <xsl:value-of select="standards-version"/>...</li>
390 </xsl:if>
391 <xsl:if test="$hasother">
392 <xsl:for-each select="$other/problems/item">
393 <xsl:call-template name="outputitem"/>
394 </xsl:for-each>
395 </xsl:if>
396 </xsl:variable>
397 <xsl:if test="count($problems)>0 and string($problems)!=''">
398 <tr class="titlerow">
399 <td class="titlecell" style="background-color: red">
400 Problems
401 </td></tr>
402 <tr class="normalrow">
403 <td class="contentcell2"><xsl:copy-of select="$problems"/>
404 </td>
405 </tr>
406 </xsl:if>
407
408 <xsl:if test="$hasexcuse">
409 <tr class="titlerow">
410 <td class="titlecell">
411 Testing Status
412 </td></tr>
413 <tr class="normalrow">
414 <td class="contentcell2" style="text-align: left">
415 <xsl:for-each select="document(concat('../base/', $dir, '/excuse.xml'))/excuse/item">
416 <xsl:call-template name="outputitem"/>
417 </xsl:for-each>
418 </td>
419 </tr>
420 </xsl:if>
421
422
423 <xsl:variable name="static">
424 <xsl:if test="$hasnews">
425 <xsl:for-each select="document(concat('../base/', $dir, '/news.xml'))/news/static/item">
426 <xsl:call-template name="outputitem"/>
427 </xsl:for-each>
428 </xsl:if>
429 </xsl:variable>
430 <xsl:if test="count($static)>0 and string($static)!=''">
431 <tr class="titlerow">
432 <td class="titlecell">
433 Static Information
434 </td></tr>
435 <tr class="normalrow">
436 <td class="contentcell2"><xsl:copy-of select="$static"/></td>
437 </tr>
438 </xsl:if>
439
440 <xsl:variable name="news">
441 <xsl:if test="$hasnews">
442 <xsl:for-each select="document(concat('../base/', $dir, '/news.xml'))/news/news/item">
443 <xsl:call-template name="outputitem"/>
444 </xsl:for-each>
445 </xsl:if>
446 </xsl:variable>
447 <xsl:if test="count($news)>0 and string($news)!=''">
448 <tr class="titlerow">
449 <td class="titlecell">
450 Latest News
451 </td></tr>
452 <tr class="normalrow">
453 <td class="contentcell2"><xsl:copy-of select="$news"/></td>
454 </tr>
455 </xsl:if>
456
457 </table>
458 <!-- END RIGHT SIDE -->
459 </td></tr>
460 </table>
461 <hr/>
462 Debian Package Tracking System - Copyright 2002 Raphaël Hertzog<br/>
463 Last modified : <xsl:value-of select="$date"/>
464 </body>
465 </html>
466 </xsl:template>
467
468 </xsl:stylesheet>

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5