]>
Commit | Line | Data |
---|---|---|
9a682fcf MM |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
3 | ||
4 | <!-- TODO: 1) links | |
5 | 2) proper dates with http://www.djkaty.com/drupal/xsl-date-time --> | |
6 | ||
7 | <xsl:template match="/queue"> | |
8 | ||
9 | <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-size="10pt"> | |
10 | ||
11 | <fo:layout-master-set> | |
12 | <fo:simple-page-master master-name="A4" page-width="210mm" page-height="297mm" margin="1cm"> | |
13 | <fo:region-body margin="0cm"/> | |
14 | <fo:region-before extent="0cm"/> | |
15 | <fo:region-after extent="0cm"/> | |
16 | <fo:region-start extent="0cm"/> | |
17 | <fo:region-end extent="0cm"/> | |
18 | </fo:simple-page-master> | |
19 | </fo:layout-master-set> | |
20 | <fo:page-sequence master-reference="A4"> | |
21 | <fo:flow flow-name="xsl-region-body"> | |
22 | ||
23 | ||
24 | <xsl:for-each select="group"> | |
25 | <xsl:sort select="@no" order="descending"/> | |
26 | ||
27 | <fo:block space-before="2mm" space-after="2mm"><fo:inline font-weight="bold"><xsl:value-of select="@no"/></fo:inline>. <xsl:value-of select="time"/> from <xsl:value-of select="requester"/><xsl:text> </xsl:text><fo:inline font-size="small"><xsl:value-of select="@id"/>, <xsl:value-of select="priority"/>, <xsl:value-of select="@flags"/></fo:inline></fo:block> | |
28 | <fo:list-block space-before="2mm" space-after="2mm"> | |
29 | <xsl:for-each select="batch"> | |
30 | <fo:list-item space-before="2mm" space-after="2mm"> | |
31 | <fo:list-item-label start-indent="5mm"> | |
32 | <fo:block font-family="monospace">*</fo:block> | |
33 | </fo:list-item-label> | |
34 | <fo:list-item-body start-indent="9mm"> | |
35 | <fo:block> | |
36 | <xsl:value-of select="src-rpm"/> | |
37 | (<xsl:value-of select="spec"/> -R <xsl:value-of select="branch"/> | |
38 | <xsl:for-each select="with | without"> | |
39 | <xsl:if test="name() = 'with'"> | |
40 | <xsl:text> --with </xsl:text> | |
41 | </xsl:if> | |
42 | <xsl:if test="name() = 'without'"> | |
43 | <xsl:text> --without </xsl:text> | |
44 | </xsl:if> | |
45 | <xsl:value-of select="."/> | |
46 | <xsl:if test="position() != last()"> | |
47 | <xsl:text> </xsl:text> | |
48 | </xsl:if> | |
49 | </xsl:for-each> | |
50 | <xsl:if test="kernel"> | |
51 | <xsl:text> --define 'alt_kernel </xsl:text> | |
52 | <xsl:value-of select="kernel"/>' | |
53 | </xsl:if>) | |
54 | <fo:inline font-size="small"> | |
55 | [<xsl:for-each select="builder"> | |
56 | <xsl:choose> | |
57 | <xsl:when test="@status = 'OK'"> | |
58 | <fo:inline color="green"><xsl:value-of select="."/>:<xsl:value-of select="@status"/></fo:inline> | |
59 | </xsl:when> | |
60 | <xsl:when test="@status = 'FAIL'"> | |
61 | <fo:inline color="red"><xsl:value-of select="."/>:<xsl:value-of select="@status"/></fo:inline> | |
62 | </xsl:when> | |
63 | <xsl:otherwise> | |
64 | <fo:inline color="black"><xsl:value-of select="."/>:<xsl:value-of select="@status"/></fo:inline> | |
65 | </xsl:otherwise> | |
66 | </xsl:choose> | |
67 | <xsl:if test="position()!=last()"><xsl:text> </xsl:text></xsl:if> | |
68 | </xsl:for-each>] | |
69 | </fo:inline> | |
70 | </fo:block> | |
71 | </fo:list-item-body> | |
72 | </fo:list-item> | |
73 | </xsl:for-each> | |
74 | </fo:list-block> | |
75 | ||
76 | </xsl:for-each> | |
77 | ||
78 | </fo:flow> | |
79 | </fo:page-sequence> | |
80 | ||
81 | </fo:root> | |
82 | ||
83 | </xsl:template> | |
84 | ||
85 | </xsl:stylesheet> | |
86 |