Subversion Repositories bacoAlunos

Rev

Rev 1553 | Rev 1557 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1553 jmachado 1
<?xml version="1.0" encoding="UTF-8"?>
1549 jmachado 2
<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
3
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1553 jmachado 4
 
1549 jmachado 5
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
                xsi:schemaLocation="http://www.w3.org/1999/XSL/Format http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/fop/src/foschema/fop.xsd">
7
    <xsl:param name="site">http://localhost/bacoTESTE</xsl:param>
1553 jmachado 8
    <xsl:param name="updateDate">EM FALTA</xsl:param>
9
    <xsl:param name="anoLectivo"><xsl:value-of select="//anoLectivo"/></xsl:param>
10
    <xsl:param name="nomeDocente"><xsl:value-of select="//nomeDocente"/></xsl:param>
11
    <xsl:param name="numeroDocente"><xsl:value-of select="//numeroDocente"/></xsl:param>
1549 jmachado 12
 
13
 
1553 jmachado 14
 
15
 
16
 
1549 jmachado 17
    <xsl:template match="/">
1553 jmachado 18
        <!--<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Helvetica" color="#58585A">-->
19
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Helvetica" color="black">
1549 jmachado 20
            <fo:layout-master-set>
21
                <fo:simple-page-master master-name="A4Vertical" page-width="210mm" page-height="297mm"
22
                                       margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"
23
                                       reference-orientation="0">
1551 jmachado 24
                    <fo:region-body region-name="body" margin-top="40mm" margin-bottom="10mm" margin-right="0"
1549 jmachado 25
                                    margin-left="0"/>
26
 
27
                    <fo:region-before region-name="header" extent="15mm"/>
28
                    <fo:region-after region-name="footer" extent="1cm"/>
29
                </fo:simple-page-master>
30
 
31
                <fo:simple-page-master master-name="A4VerticalFirstPage" page-width="210mm" page-height="297mm"
32
                                       margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"
33
                                       reference-orientation="0">
34
                    <fo:region-body region-name="body" margin-top="90mm" margin-bottom="10mm" margin-right="0"
35
                                    margin-left="0"/>
36
 
37
                    <fo:region-before region-name="header" extent="15mm"/>
38
                    <fo:region-after region-name="footer" extent="1cm"/>
39
                </fo:simple-page-master>
40
 
41
 
42
 
43
                <fo:simple-page-master master-name="A4HorizontalRot" page-width="210mm" page-height="297mm"
44
                                       margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.5cm" margin-right="0.5cm"
45
                                       reference-orientation="90">
46
                    <fo:region-body region-name="body" margin-top="20mm" margin-bottom="10mm" margin-right="0"
47
                                    margin-left="0"/>
48
                    <fo:region-before region-name="header" extent="15mm"/>
49
                    <fo:region-after region-name="footer" extent="1cm"/>
50
                </fo:simple-page-master>
51
                <fo:simple-page-master master-name="A4Horizontal" page-width="297mm" page-height="210mm"
52
                                       margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.5cm"
53
                                       margin-right="0.5cm">
54
                    <fo:region-body region-name="body" margin-top="20mm" margin-bottom="15mm" margin-right="0"
55
                                    margin-left="0"/>
56
                    <fo:region-before region-name="header" extent="15mm"/>
57
                    <fo:region-after region-name="footer" extent="1cm"/>
58
                </fo:simple-page-master>
59
                <fo:page-sequence-master master-name="pages">
60
                    <fo:repeatable-page-master-alternatives>
61
                        <fo:conditional-page-master-reference master-reference="pages" page-position="any"/>
62
                    </fo:repeatable-page-master-alternatives>
63
                </fo:page-sequence-master>
64
            </fo:layout-master-set>
65
 
66
            <!--LAYOUT DE PAGINA ESCOLHIDO-->
67
 
68
            <fo:page-sequence master-reference="A4VerticalFirstPage" initial-page-number="1">
69
                <xsl:call-template name="firstpage"/>
70
            </fo:page-sequence>
71
            <fo:page-sequence master-reference="A4Vertical" initial-page-number="2">
1551 jmachado 72
                <xsl:call-template name="indexPage"/>
73
            </fo:page-sequence>
74
            <fo:page-sequence master-reference="A4Vertical" initial-page-number="3">
1549 jmachado 75
                <xsl:call-template name="page"/>
76
            </fo:page-sequence>
77
 
78
 
79
        </fo:root>
80
    </xsl:template>
81
 
82
 
83
    <xsl:template name="firstpage">
84
        <fo:static-content flow-name="header">
85
            <fo:block text-align="left">
86
                <fo:table width="100%" table-layout="fixed" border-bottom="1px solid black">
87
                    <fo:table-column column-width="100%"/>
88
                    <fo:table-body>
89
                        <fo:table-row>
90
                            <fo:table-cell>
91
                                <fo:block>
92
                                    <fo:external-graphic height="auto" width="auto"
93
                                                         content-height="80">
94
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 95
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/layout/themes/ipp/logo.jpg')
1549 jmachado 96
                                        </xsl:attribute>
97
                                    </fo:external-graphic>
98
                                </fo:block>
99
                            </fo:table-cell>
100
 
101
                        </fo:table-row>
102
 
103
                    </fo:table-body>
104
                </fo:table>
105
 
106
            </fo:block>
107
        </fo:static-content>
108
        <fo:static-content flow-name="footer">
1551 jmachado 109
            <xsl:call-template name="footerDefault"/>
1549 jmachado 110
        </fo:static-content>
111
 
112
 
113
        <fo:flow flow-name="body">
1551 jmachado 114
            <fo:block border-bottom="8px solid #58585A" border-top="4px solid #58585A" font-size="26px" padding="6px" text-align="center" color="white" background-color="#FFCA44">
1553 jmachado 115
                <fo:inline font-weight="bold"> Relatório de Avaliação Pedagógica</fo:inline>
1549 jmachado 116
            </fo:block>
117
 
118
            <fo:block  font-size="20px" padding="4px" margin-top="40px" text-align="center" >
1553 jmachado 119
                <fo:inline text-decoration="underline" font-weight="bold">Inquéritos Pedagógicos aos Alunos</fo:inline>
1549 jmachado 120
            </fo:block>
121
 
1551 jmachado 122
            <fo:block font-size="18px" padding="4px" margin-top="20px" text-align="center">
1553 jmachado 123
                <fo:inline>Relatório Docente</fo:inline>
1549 jmachado 124
            </fo:block>
125
 
1551 jmachado 126
            <fo:block font-size="14px" padding="4px" margin-top="5px" text-align="center" background-color="#fff9ea">
1549 jmachado 127
                <xsl:value-of select="$nomeDocente"/>
128
            </fo:block>
129
            <fo:block font-size="12px" padding="4px" margin-top="2px" text-align="center">
1553 jmachado 130
                <fo:inline>Docente Número: <xsl:value-of select="$numeroDocente"/></fo:inline>
1549 jmachado 131
            </fo:block>
132
            <fo:block font-size="12px" padding="4px" margin-top="20px" text-align="center" >
1551 jmachado 133
                <fo:inline><fo:wrapper white-space-treatment="preserve" font-weight="bold">Ano letivo: </fo:wrapper> <xsl:value-of select="$anoLectivo"/></fo:inline>
1549 jmachado 134
            </fo:block>
135
        </fo:flow>
136
    </xsl:template>
137
 
1551 jmachado 138
    <xsl:template name="indexPage">
139
        <fo:static-content flow-name="header">
140
            <xsl:call-template name="headerTeacher"/>
141
        </fo:static-content>
142
        <fo:static-content flow-name="footer">
143
            <xsl:call-template name="footerDefault"/>
144
        </fo:static-content>
145
 
146
        <fo:flow flow-name="body">
147
 
148
            <fo:block  font-size="20px" padding="4px" margin-top="40px" text-align="center" >
149
                <fo:inline text-decoration="underline" font-weight="bold">Indice</fo:inline>
150
            </fo:block>
151
 
152
 
153
            <fo:block text-align-last="justify" font-weight="bold" margin-bottom="5px">
154
                    <xsl:text> </xsl:text>
155
                    <fo:leader/>
156
                    Pag.
157
            </fo:block>
158
 
159
            <fo:block font-size="14px" text-align-last="justify">
1553 jmachado 160
                <fo:basic-link internal-destination="capParticipacao">
1551 jmachado 161
                    <fo:inline font-weight="bold" padding-top="3px" padding-bottom="2px" padding-left="3px" padding-right="3px" margin-right="10px" border-bottom="1px solid #58585A" font-size="16px" color="white" background-color="#FFCA44">1</fo:inline>
162
                    <xsl:text> </xsl:text>
1554 jmachado 163
                    Participação nos questionários do docente
1551 jmachado 164
                    <fo:leader leader-pattern="dots" />
1553 jmachado 165
                    <fo:page-number-citation ref-id="capParticipacao" />
1551 jmachado 166
                </fo:basic-link>
167
            </fo:block>
168
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
1553 jmachado 169
                <fo:basic-link internal-destination="capCaracterizacao">
1551 jmachado 170
                    <fo:inline font-weight="bold" padding-top="3px" padding-bottom="2px" padding-left="3px" padding-right="3px" margin-right="10px" border-bottom="1px solid #58585A" font-size="16px" color="white" background-color="#FFCA44">2</fo:inline>
171
                    <xsl:text> </xsl:text>
1554 jmachado 172
                    Caracterização da qmostra
1551 jmachado 173
                    <fo:leader leader-pattern="dots" />
1553 jmachado 174
                    <fo:page-number-citation ref-id="capCaracterizacao" />
1551 jmachado 175
                </fo:basic-link>
176
            </fo:block>
1553 jmachado 177
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
178
                <fo:basic-link internal-destination="capQuestoes">
1554 jmachado 179
                    <fo:inline font-weight="bold" padding-top="3px" padding-bottom="2px" padding-left="3px" padding-right="3px" margin-right="10px" border-bottom="1px solid #58585A" font-size="16px" color="white" background-color="#FFCA44">3</fo:inline>
1553 jmachado 180
                    <xsl:text> </xsl:text>
1554 jmachado 181
                    Análise das questões sobre o docente
1553 jmachado 182
                    <fo:leader leader-pattern="dots" />
183
                    <fo:page-number-citation ref-id="capQuestoes" />
184
                </fo:basic-link>
185
            </fo:block>
1554 jmachado 186
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
187
                <fo:basic-link internal-destination="capQuestoesUnidades">
188
                    <fo:inline font-weight="bold" padding-top="3px" padding-bottom="2px" padding-left="3px" padding-right="3px" margin-right="10px" border-bottom="1px solid #58585A" font-size="16px" color="white" background-color="#FFCA44">4</fo:inline>
189
                    <xsl:text> </xsl:text>
190
                    Análise das questões relativas ao grupo unidade para as unidades do docente
191
                    <fo:leader leader-pattern="dots" />
192
                    <fo:page-number-citation ref-id="capQuestoesUnidades" />
193
                </fo:basic-link>
194
            </fo:block>
1551 jmachado 195
 
196
 
1554 jmachado 197
 
1551 jmachado 198
        </fo:flow>
199
    </xsl:template>
200
 
1553 jmachado 201
    <xsl:template name="seccao">
202
        <xsl:param name="text"/>
1554 jmachado 203
        <xsl:param name="marginTop">5px</xsl:param>
1553 jmachado 204
            <fo:block
205
                  font-size="16px"
206
                  font-weight="bold"
207
                  padding="4px"
1554 jmachado 208
                  margin-top="{$marginTop}"
1553 jmachado 209
                  text-align="left"
210
                  background-color="#FFEAAE">
211
            <xsl:value-of select="$text"/>
212
        </fo:block>
213
    </xsl:template>
1551 jmachado 214
 
1553 jmachado 215
    <xsl:template name="subSeccao">
216
        <xsl:param name="text"/>
1554 jmachado 217
        <xsl:param name="marginTop">15px</xsl:param>
1553 jmachado 218
        <fo:block font-size="13px"
219
                  padding-top="3px"
220
                  padding-bottom="3px"
221
                  padding-left="5px"
1554 jmachado 222
                  margin-top="{$marginTop}"
1553 jmachado 223
                  margin-bottom="20px"
224
                  text-align="left"
225
                  background-color="#D6D9BC">
226
            <xsl:value-of select="$text"/>
227
        </fo:block>
228
    </xsl:template>
229
 
1554 jmachado 230
    <xsl:template name="subSubSeccao">
231
        <xsl:param name="text"/>
232
        <fo:block font-size="8px"
233
                  padding-top="0"
234
                  padding-bottom="0"
235
                  padding-left="25px"
236
                  margin-top="0"
237
                  margin-bottom="5px"
238
                  text-align="left"
239
                  font-weight="bold">
240
            <xsl:value-of select="$text"/>
241
        </fo:block>
242
    </xsl:template>
243
 
1549 jmachado 244
    <xsl:template name="page">
245
        <fo:static-content flow-name="header">
1551 jmachado 246
            <xsl:call-template name="headerTeacher"/>
247
        </fo:static-content>
248
        <fo:static-content flow-name="footer">
249
            <xsl:call-template name="footerDefault"/>
250
        </fo:static-content>
1549 jmachado 251
 
1551 jmachado 252
        <fo:flow flow-name="body">
1553 jmachado 253
            <fo:block-container padding="0" margin="0" id="capParticipacao" page-break-before="always">
254
                <xsl:call-template name="seccao">
255
                    <xsl:with-param name="text">1 - Participação</xsl:with-param>
1554 jmachado 256
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1553 jmachado 257
                </xsl:call-template>
258
            </fo:block-container>
259
 
260
            <xsl:call-template name="subSeccao">
261
                <xsl:with-param name="text">Taxa Global de Participação aos Questionários do Docente</xsl:with-param>
262
            </xsl:call-template>
263
 
264
            <fo:block-container font-size="18" text-align="center" font-weight="bold">
265
                <xsl:call-template name="barraPercentil">
266
                    <xsl:with-param name="valor" select="//questionariosReqRespondidosPercentagem"/>
267
                    <xsl:with-param name="colors">true</xsl:with-param>
268
                </xsl:call-template>
269
            </fo:block-container>
270
 
271
 
272
 
273
            <fo:block  margin-left="10px">
274
 
275
 
276
                <fo:table width="100%" table-layout="fixed">
277
                    <fo:table-column column-width="50%"/>
278
                    <fo:table-column column-width="50%"/>
279
                    <fo:table-body>
280
                        <fo:table-row>
281
                            <fo:table-cell>
282
 
283
 
284
                                <xsl:call-template name="subSeccao">
285
                                    <xsl:with-param name="text">
286
                                        Taxa de Participação
287
                                    </xsl:with-param>
288
                                </xsl:call-template>
289
                                <fo:block>
290
                                    <fo:external-graphic width="auto" height="auto" content-height="140">
291
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
292
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoTaxaRespostaAlunos"/>
293
                                        </xsl:attribute>
294
                                    </fo:external-graphic>
295
                                </fo:block>
296
 
297
                            </fo:table-cell>
298
                            <fo:table-cell>
299
 
300
                                <xsl:call-template name="subSeccao">
301
                                    <xsl:with-param name="text">
302
                                        Taxa de Resposta a Questionarios
303
                                    </xsl:with-param>
304
                                </xsl:call-template>
305
                                <fo:block>
306
                                    <fo:external-graphic width="auto" height="auto" content-height="140">
307
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
308
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoTaxaRespostaQuestionarios"/></xsl:attribute>
309
                                    </fo:external-graphic>
310
                                </fo:block>
311
 
312
                            </fo:table-cell>
313
                        </fo:table-row>
314
                        <fo:table-row>
315
                            <fo:table-cell number-columns-spanned="2">
316
 
317
                                <xsl:call-template name="subSeccao">
318
                                    <xsl:with-param name="text">
319
                                        Taxa de Participação por Unidade Curricular
320
                                    </xsl:with-param>
321
                                </xsl:call-template>
322
                                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
1554 jmachado 323
                                    <xsl:apply-templates select="//tabelaTaxaRespostaUnidade" mode="DataTable">
324
                                        <xsl:with-param name="firstColPercentSize">60%</xsl:with-param>
325
                                    </xsl:apply-templates>
1553 jmachado 326
                                </fo:block>
327
                            </fo:table-cell>
328
                        </fo:table-row>
329
                    </fo:table-body>
330
                </fo:table>
1551 jmachado 331
            </fo:block>
332
 
1553 jmachado 333
 
334
            <fo:block-container page-break-before="always" padding="0" margin="0" id="capCaracterizacao">
335
                <xsl:call-template name="seccao">
1554 jmachado 336
                    <xsl:with-param name="text">2 - Caracterização da Amostra Recolhida</xsl:with-param>
337
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1553 jmachado 338
                </xsl:call-template>
339
            </fo:block-container>
340
 
341
 
342
 
343
 
344
 
345
 
1551 jmachado 346
            <fo:block text-align="center" margin-left="10px">
347
                <fo:table width="100%" table-layout="fixed">
1549 jmachado 348
                    <fo:table-column column-width="50%"/>
349
                    <fo:table-column column-width="50%"/>
350
                    <fo:table-body>
351
                        <fo:table-row>
352
                            <fo:table-cell>
353
 
1553 jmachado 354
                                <xsl:call-template name="subSeccao">
355
                                    <xsl:with-param name="text">
356
                                        Género
357
                                    </xsl:with-param>
358
                                </xsl:call-template>
1551 jmachado 359
 
1553 jmachado 360
                                <fo:block>
361
                                    <fo:table width="90%" table-layout="fixed" >
1551 jmachado 362
                                        <fo:table-column column-width="50%"/>
363
                                        <fo:table-column column-width="50%"/>
364
                                        <fo:table-body>
365
                                            <fo:table-row>
366
                                                <fo:table-cell>
367
                                                    <fo:block>
1553 jmachado 368
                                                        <xsl:value-of select="//masculinoComResposta"/>
1551 jmachado 369
                                                    </fo:block>
370
                                                    <fo:block>
371
                                                        <fo:external-graphic height="auto" width="auto"
1553 jmachado 372
                                                                             content-height="120">
1551 jmachado 373
                                                            <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
374
                                                            <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/studentMale.png')
375
                                                            </xsl:attribute>
376
                                                        </fo:external-graphic>
377
                                                    </fo:block>
378
                                                    <fo:block>
1553 jmachado 379
                                                        <xsl:value-of select="//masculinoComRespostaPercent"/>%
1551 jmachado 380
                                                    </fo:block>
381
                                                </fo:table-cell>
382
                                                <fo:table-cell>
383
                                                    <fo:block>
1553 jmachado 384
                                                        <xsl:value-of select="//femininoComResposta"/>
1551 jmachado 385
                                                    </fo:block>
386
                                                    <fo:block>
387
                                                        <fo:external-graphic height="auto" width="auto"
1553 jmachado 388
                                                                             content-height="120">
1551 jmachado 389
                                                            <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
390
                                                            <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/studentFemale.png')
391
                                                            </xsl:attribute>
392
                                                        </fo:external-graphic>
393
                                                    </fo:block>
394
                                                    <fo:block>
1553 jmachado 395
                                                        <xsl:value-of select="//femininoComRespostaPercent"/>%
1551 jmachado 396
                                                    </fo:block>
397
                                                </fo:table-cell>
398
                                            </fo:table-row>
399
                                        </fo:table-body>
400
                                    </fo:table>
1553 jmachado 401
                                </fo:block>
1551 jmachado 402
 
403
 
404
 
1549 jmachado 405
                            </fo:table-cell>
406
                            <fo:table-cell>
1553 jmachado 407
 
408
 
409
 
410
 
411
                                <xsl:call-template name="subSeccao">
412
                                    <xsl:with-param name="text">
413
                                        Tipos de Alunos
414
                                    </xsl:with-param>
415
                                </xsl:call-template>
416
 
417
                                <fo:block margin-top="5px">
418
                                    <fo:external-graphic width="auto" height="auto" content-width="250" content-height="150">
1551 jmachado 419
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 420
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoTiposAlunosComResposta"/>
421
                                        </xsl:attribute>
1551 jmachado 422
                                    </fo:external-graphic>
1549 jmachado 423
                                </fo:block>
1553 jmachado 424
 
425
 
426
 
1549 jmachado 427
                            </fo:table-cell>
428
 
429
                        </fo:table-row>
1553 jmachado 430
                        <fo:table-row>
431
                            <fo:table-cell>
1549 jmachado 432
 
1553 jmachado 433
                                <xsl:call-template name="subSeccao">
434
                                    <xsl:with-param name="text">
435
                                        Idades
436
                                    </xsl:with-param>
437
                                </xsl:call-template>
438
 
439
                                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
440
                                    <xsl:apply-templates select="//tabelaIdades" mode="DataTable"/>
441
                                </fo:block>
442
 
443
                            </fo:table-cell>
444
                            <fo:table-cell>
445
 
446
                                <xsl:call-template name="subSeccao">
447
                                    <xsl:with-param name="text">
448
                                        Distritos
449
                                    </xsl:with-param>
450
                                </xsl:call-template>
451
 
452
 
453
                                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
1554 jmachado 454
                                    <xsl:apply-templates select="//tabelaDistritos" mode="DataTable">
455
                                        <xsl:with-param name="firstColPercentSize">30%</xsl:with-param>
456
                                    </xsl:apply-templates>
1553 jmachado 457
                                </fo:block>
458
 
459
                            </fo:table-cell>
460
 
461
                        </fo:table-row>
462
 
1549 jmachado 463
                    </fo:table-body>
464
                </fo:table>
1553 jmachado 465
            </fo:block>
1549 jmachado 466
 
1553 jmachado 467
 
468
 
469
            <fo:block-container padding="0" margin="0" id="capQuestoes" page-break-before="always">
470
                <xsl:call-template name="seccao">
471
                    <xsl:with-param name="text">3 - Análise das Questões sobre o Docente</xsl:with-param>
1554 jmachado 472
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1553 jmachado 473
                </xsl:call-template>
474
            </fo:block-container>
475
 
1554 jmachado 476
            <xsl:call-template name="subSeccao">
477
                <xsl:with-param name="text">3.1 - Gráficos de respostas agregadas de todas as unidades do docente</xsl:with-param>
478
            </xsl:call-template>
1553 jmachado 479
 
1554 jmachado 480
            <xsl:apply-templates select="//respostasAgregadasCharts/respostasChartsRow" mode="graficosPerguntas"/>
1553 jmachado 481
 
1554 jmachado 482
            <fo:block-container padding="0" margin="0" page-break-before="always">
483
                <xsl:call-template name="subSeccao">
484
                    <xsl:with-param name="text">3.2 - Tabela de respostas agregadas de todas as unidades do docente</xsl:with-param>
485
                    <xsl:with-param name="marginTop">0</xsl:with-param>
486
                </xsl:call-template>
487
            </fo:block-container>
488
            <fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
489
                <xsl:apply-templates select="//respostasTable" mode="DataTable">
490
                    <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
491
                </xsl:apply-templates>
492
            </fo:block>
493
            <fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
494
                Docentes avaliados nos cursos onde o docente leciona: <xsl:value-of select="//docentesNosCursos"/>
495
            </fo:block>
496
            <fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
497
                Docentes avaliados nas escolas onde o docente leciona: <xsl:value-of select="//docentesNasEscolas"/>
498
            </fo:block>
1553 jmachado 499
 
1554 jmachado 500
            <fo:block-container margin-top="5px" margin-bottom="5px">
501
                <xsl:apply-templates select="//mediasGrupoDocente" mode="mediasGrupo">
502
                    <xsl:with-param name="objetoAvaliacao">do docente</xsl:with-param>
503
                </xsl:apply-templates>
504
            </fo:block-container>
1553 jmachado 505
 
1554 jmachado 506
            <!--Considerando Respostas Superiores a 2 segindos-->
507
            <fo:block-container background-color="#aaaaaa" padding="5px" margin="0" margin-top="10px">
508
                <fo:block-container padding="0" margin="0">
509
                    <xsl:call-template name="subSubSeccao">
510
                        <xsl:with-param name="text">Considerando apenas respostas de tempo superior a 2 segundos (Estes dados são apenas para efeitos de comparação)</xsl:with-param>
511
                    </xsl:call-template>
512
                </fo:block-container>
513
 
514
                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
515
                    <xsl:apply-templates select="//respostasTableGt2Secs" mode="DataTable">
516
                        <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
517
                    </xsl:apply-templates>
518
                </fo:block>
519
            </fo:block-container>
520
 
521
 
522
 
523
 
524
 
525
            <!--#######################################-->
526
            <!-- RESPOSTAS AGREGADAS DAS UNIDADES CURRICULARES -->
527
 
528
            <fo:block-container padding="0" margin="0" id="capQuestoesUnidades" page-break-before="always">
529
                <xsl:call-template name="seccao">
530
                    <xsl:with-param name="text">4 - Análise das questões relativas ao grupo unidade para as unidades do docente</xsl:with-param>
531
                    <xsl:with-param name="marginTop">0</xsl:with-param>
532
                </xsl:call-template>
533
            </fo:block-container>
534
 
535
            <xsl:call-template name="subSeccao">
536
                <xsl:with-param name="text">4.1 - Gráficos de respostas agregadas de todas as unidades</xsl:with-param>
537
            </xsl:call-template>
538
 
539
            <xsl:apply-templates select="//respostasAgregadasUnidadesCharts/respostasChartsRow" mode="graficosPerguntas"/>
540
 
541
 
542
            <fo:block-container padding="0" margin="0" page-break-before="always">
543
                <xsl:call-template name="subSeccao">
544
                    <xsl:with-param name="text">4.2 - Tabela de respostas agregadas de todas as unidades do docente</xsl:with-param>
545
                    <xsl:with-param name="marginTop">0</xsl:with-param>
546
                </xsl:call-template>
547
            </fo:block-container>
548
 
549
            <fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
550
                <xsl:apply-templates select="//respostasUnidadesTable" mode="DataTable">
551
                    <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
552
                </xsl:apply-templates>
553
            </fo:block>
554
 
555
            <fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
556
                Unidades avaliadas nos cursos onde o docente leciona: <xsl:value-of select="//unidadesNosCursos"/>
557
            </fo:block>
558
            <fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
559
                Unidades avaliadas nas escolas onde o docente leciona: <xsl:value-of select="//unidadesNasEscolas"/>
560
            </fo:block>
561
 
562
            <fo:block-container margin-top="5px" margin-bottom="5px">
563
                <xsl:apply-templates select="//mediasGrupoUnidades" mode="mediasGrupo">
564
                    <xsl:with-param name="objetoAvaliacao">das unidades</xsl:with-param>
565
                </xsl:apply-templates>
566
            </fo:block-container>
567
 
1551 jmachado 568
        </fo:flow>
569
    </xsl:template>
1549 jmachado 570
 
1554 jmachado 571
    <xsl:template match="*" mode="graficosPerguntas">
572
        <fo:block text-align="center" margin-left="10px">
573
            <fo:table width="100%" table-layout="fixed">
574
                <xsl:for-each select="./respostasChartsRow[1]/respostasChart/respostasChart">
575
                    <fo:table-column/>
576
                </xsl:for-each>
577
                <fo:table-body>
578
                    <xsl:for-each select="./respostasChartsRow">
579
                        <fo:table-row>
580
                            <xsl:for-each select="./respostasChart/respostasChart">
581
                                <fo:table-cell>
582
                                    <fo:block>
583
                                        <fo:external-graphic
584
                                                width="100%"
585
                                                content-height="100%"
586
                                                content-width="scale-to-fit"
587
                                                scaling="uniform"
588
                                                >
589
                                            <xsl:attribute name="src">url('<xsl:value-of select="./tempFile"/>')
590
                                            </xsl:attribute>
591
                                        </fo:external-graphic>
592
                                    </fo:block>
593
                                </fo:table-cell>
594
                            </xsl:for-each>
595
                        </fo:table-row>
596
                    </xsl:for-each>
1549 jmachado 597
 
1554 jmachado 598
                </fo:table-body>
599
            </fo:table>
600
        </fo:block>
1553 jmachado 601
 
1554 jmachado 602
        <fo:block-container margin-top="20px">
603
            <xsl:call-template name="legendaCoresPerguntas"/>
604
        </fo:block-container>
605
    </xsl:template>
1553 jmachado 606
 
1554 jmachado 607
    <xsl:template match="*" mode="mediasGrupo">
608
        <xsl:param name="objetoAvaliacao"/>
609
        <fo:block>
610
 
611
            <fo:table width="100%" table-layout="fixed" font-size="10pt" font-weight="normal">
612
                <fo:table-column column-width="60%"/>
613
                <fo:table-column column-width="40%"/>
614
                <fo:table-body>
615
                    <fo:table-row>
616
                        <fo:table-cell display-align="center" text-align="center" padding-right="10px" >
617
                            <xsl:apply-templates select="." mode="globalSmile">
618
                                <xsl:with-param name="objetoAvaliacao" select="$objetoAvaliacao"/>
619
                            </xsl:apply-templates>
620
                        </fo:table-cell>
621
                        <fo:table-cell display-align="center" text-align="center" padding-left="10px">
622
                            <fo:block>
623
                                <xsl:apply-templates select="./mediasGlobaisTable" mode="DataTable"/>
624
                            </fo:block>
625
                        </fo:table-cell>
626
                    </fo:table-row>
627
                </fo:table-body>
628
            </fo:table>
629
 
630
        </fo:block>
631
    </xsl:template>
632
 
633
 
634
 
635
    <xsl:template match="*" mode="globalSmile">
636
        <xsl:param name="objetoAvaliacao"></xsl:param>
637
        <fo:block>
638
            <fo:table width="100%" table-layout="fixed" font-size="10pt" font-weight="normal">
639
                <fo:table-column column-width="30%"/>
640
                <fo:table-column/>
641
                <fo:table-column/>
642
                <fo:table-column/>
643
                <fo:table-column/>
644
                <fo:table-column/>
645
                <fo:table-body>
646
                    <fo:table-row>
647
                        <fo:table-cell text-align="center" >
648
                            <fo:block>
649
 
650
                            </fo:block>
651
                        </fo:table-cell>
652
                        <fo:table-cell text-align="center" >
653
                            <fo:block>
654
                                <fo:external-graphic height="auto" width="auto"
655
                                                     content-height="30">
656
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
657
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/sad.png')
658
                                    </xsl:attribute>
659
                                </fo:external-graphic>
660
                            </fo:block>
661
                        </fo:table-cell>
662
                        <fo:table-cell>
663
                            <fo:block></fo:block>
664
                        </fo:table-cell>
665
                        <fo:table-cell text-align="center" >
666
                            <fo:block>
667
                                <fo:external-graphic height="auto" width="auto"
668
                                                     content-height="30">
669
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
670
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/indiferent.png')
671
                                    </xsl:attribute>
672
                                </fo:external-graphic>
673
                            </fo:block>
674
                        </fo:table-cell>
675
                        <fo:table-cell>
676
                            <fo:block></fo:block>
677
                        </fo:table-cell>
678
                        <fo:table-cell text-align="center" >
679
                            <fo:block>
680
                                <fo:external-graphic height="auto" width="auto"
681
                                                     content-height="30">
682
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
683
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/smile.png')
684
                                    </xsl:attribute>
685
                                </fo:external-graphic>
686
                            </fo:block>
687
                        </fo:table-cell>
688
                    </fo:table-row>
689
                    <fo:table-row border="2px solid black">
690
                        <fo:table-cell display-align="center" background-color="{$backgroundHeader}" text-align="center" padding="2px" border="2px solid black" font-size="7pt">
691
                            <fo:block>Avaliação média <xsl:value-of select="$objetoAvaliacao"/> em todas as questões</fo:block>
692
                        </fo:table-cell>
693
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
694
                            <xsl:if test="./avaliacaoMediaArredondada=1">
695
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
696
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
697
                            </xsl:if>
698
                            <fo:block>1</fo:block>
699
                        </fo:table-cell>
700
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
701
                            <xsl:if test="//avaliacaoMediaArredondada=2">
702
                                <xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
703
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
704
                            </xsl:if>
705
                            <fo:block>2</fo:block>
706
                        </fo:table-cell>
707
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
708
                            <xsl:if test="//avaliacaoMediaArredondada=3">
709
                                <xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
710
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
711
                            </xsl:if>
712
                            <fo:block>3</fo:block>
713
                        </fo:table-cell>
714
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
715
                            <xsl:if test="//avaliacaoMediaArredondada=4">
716
                                <xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
717
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
718
                            </xsl:if>
719
                            <fo:block>4</fo:block>
720
                        </fo:table-cell>
721
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
722
                            <xsl:if test="//avaliacaoMediaArredondada=5">
723
                                <xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
724
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
725
                            </xsl:if>
726
                            <fo:block>5</fo:block>
727
                        </fo:table-cell>
728
                    </fo:table-row>
729
                </fo:table-body>
730
            </fo:table>
731
        </fo:block>
732
    </xsl:template>
733
 
734
    <xsl:template name="legendaCoresPerguntas">
735
        <fo:block>
736
            <fo:table width="100%" table-layout="fixed" font-size="6.5pt" font-weight="normal">
737
                <fo:table-column column-width="50"/>
738
                <fo:table-column/>
739
 
740
                <fo:table-body>
741
                    <fo:table-row>
742
                        <fo:table-cell padding="2pt" number-columns-spanned="2">
743
                            <fo:block text-align="left" font-weight="bold">Legenda de Cores:</fo:block>
744
                        </fo:table-cell>
745
                    </fo:table-row>
746
                    <fo:table-row>
747
                        <fo:table-cell background-color="rgb(253, 11, 0)" padding="2pt">
748
                            <fo:block text-align="center">1</fo:block>
749
                        </fo:table-cell>
750
                        <fo:table-cell padding="2pt" ><fo:block>O estudante avaliou a questão como Nada Satisfeito</fo:block></fo:table-cell>
751
                    </fo:table-row>
752
                    <fo:table-row>
753
                        <fo:table-cell background-color="rgb(255, 190, 0)" padding="2pt">
754
                            <fo:block text-align="center">2</fo:block>
755
                        </fo:table-cell>
756
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão como Pouco Satisfeito</fo:block></fo:table-cell>
757
                    </fo:table-row>
758
                    <fo:table-row>
759
                        <fo:table-cell background-color="rgb(255, 254, 0)" padding="2pt">
760
                            <fo:block text-align="center">3</fo:block>
761
                        </fo:table-cell>
762
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão Satisfeito</fo:block></fo:table-cell>
763
                    </fo:table-row>
764
                    <fo:table-row>
765
                        <fo:table-cell background-color="rgb(188, 255, 0)" padding="2pt">
766
                            <fo:block text-align="center">4</fo:block>
767
                        </fo:table-cell>
768
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão bastante Satisfeito que corresponde a Bom</fo:block></fo:table-cell>
769
                    </fo:table-row>
770
                    <fo:table-row>
771
                        <fo:table-cell background-color="rgb(32, 255, 5)" padding="2pt">
772
                            <fo:block text-align="center">5</fo:block>
773
                        </fo:table-cell>
774
                        <fo:table-cell padding="2pt"><fo:block>O Estudante avaliou o docente com nota máxima de Muito Satisfeito</fo:block></fo:table-cell>
775
                    </fo:table-row>
776
                </fo:table-body>
777
            </fo:table>
778
        </fo:block>
779
    </xsl:template>
780
 
781
 
782
 
1553 jmachado 783
    <xsl:template name="barraPercentil">
784
        <xsl:param name="valor"/>
785
        <xsl:param name="colors">false</xsl:param>
1554 jmachado 786
        <fo:block-container margin="1px" border="1px solid #C6C6CA" padding="0">
1553 jmachado 787
            <xsl:choose>
788
                <xsl:when test="$colors = 'false'">
789
                    <xsl:attribute name="border">1px solid #C6C6CA</xsl:attribute>
790
                </xsl:when>
791
                <xsl:otherwise>
1554 jmachado 792
                    <xsl:attribute name="border">1px solid #FFEAAE</xsl:attribute>
1553 jmachado 793
                </xsl:otherwise>
794
            </xsl:choose>
1554 jmachado 795
            <fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="1px" padding-bottom="0">
1553 jmachado 796
                <xsl:choose>
797
                    <xsl:when test="$colors = 'false'">
798
                        <xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
799
 
800
                    </xsl:when>
801
                    <xsl:otherwise>
802
 
803
                        <xsl:choose>
804
                            <xsl:when test="$valor &lt; 25">
805
                                <xsl:attribute name="background-color">red</xsl:attribute>
806
                            </xsl:when>
807
                            <xsl:when test="$valor &lt; 40"><xsl:attribute name="background-color">orange</xsl:attribute></xsl:when>
808
                            <xsl:when test="$valor &lt; 55"><xsl:attribute name="background-color">yellow</xsl:attribute></xsl:when>
809
                            <xsl:otherwise>
810
                                <xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
811
                            </xsl:otherwise>
812
                        </xsl:choose>
813
                    </xsl:otherwise>
814
                </xsl:choose>
815
                <xsl:attribute name="width"><xsl:value-of select="$valor"/>%</xsl:attribute>
816
                <fo:block><xsl:value-of select="$valor"/>%</fo:block>
817
            </fo:block-container>
818
        </fo:block-container>
819
    </xsl:template>
820
 
1554 jmachado 821
    <xsl:template name="barraPercentilDefined">
822
        <xsl:param name="valor"/>
823
        <xsl:param name="percentDefined"/>
824
        <xsl:param name="colors">false</xsl:param>
1553 jmachado 825
 
1554 jmachado 826
        <fo:block-container margin="1px" border="1px solid #C6C6CA" padding="0">
827
 
828
            <fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="1px" padding-bottom="0">
829
                <xsl:choose>
830
                    <xsl:when test="$colors = 'false'">
831
                        <xsl:attribute name="border">1px solid #8D7F5C</xsl:attribute>
832
                        <xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
833
 
834
                    </xsl:when>
835
                    <xsl:otherwise>
836
 
837
                        <xsl:choose>
838
                            <xsl:when test="percentDefined &lt; 25">
839
                                <xsl:attribute name="border">1px solid #B10000</xsl:attribute>
840
                                <xsl:attribute name="background-color">red</xsl:attribute>
841
                            </xsl:when>
842
                            <xsl:when test="percentDefined &lt; 40">
843
                                <xsl:attribute name="border">1px solid #B85C00</xsl:attribute>
844
                                <xsl:attribute name="background-color">orange</xsl:attribute>
845
                            </xsl:when>
846
                            <xsl:when test="percentDefined &lt; 55">
847
                                <xsl:attribute name="border">1px solid #868600</xsl:attribute>
848
                                <xsl:attribute name="background-color">yellow</xsl:attribute>
849
                            </xsl:when>
850
                            <xsl:otherwise>
851
                                <xsl:attribute name="border">1px solid #157C00</xsl:attribute>
852
                                <xsl:attribute name="background-color">#24DD01</xsl:attribute>
853
                            </xsl:otherwise>
854
                        </xsl:choose>
855
                    </xsl:otherwise>
856
                </xsl:choose>
857
                <xsl:attribute name="width"><xsl:value-of select="$percentDefined"/>%</xsl:attribute>
858
                <fo:block><xsl:value-of select="$valor"/></fo:block>
859
            </fo:block-container>
860
        </fo:block-container>
861
    </xsl:template>
862
 
863
 
1551 jmachado 864
    <xsl:template name="footerDefault">
865
        <fo:table width="100%" table-layout="fixed" border-top="1px solid black" font-size="6.5pt">
866
            <fo:table-column column-width="20%"/>
867
            <fo:table-column column-width="80%"/>
1549 jmachado 868
 
869
 
1551 jmachado 870
            <fo:table-body>
871
                <fo:table-row>
872
                    <fo:table-cell padding-top="3pt">
873
                        <fo:block>
874
                            Atualizado a
1553 jmachado 875
                            <xsl:value-of select="$updateDate"/> / Página
1551 jmachado 876
                            <fo:page-number/>
877
                        </fo:block>
878
                        <fo:block font-size="5pt">
879
                            IPP.AC.xxxx.1
880
                        </fo:block>
881
 
882
                    </fo:table-cell>
883
                    <fo:table-cell padding-top="3pt">
884
                        <fo:block font-size="6pt" text-align="right">
1553 jmachado 885
                            http://pae.ipportalegre.pt | gerado pela plataforma ipp-pae® 2016
1551 jmachado 886
                        </fo:block>
887
                    </fo:table-cell>
888
                </fo:table-row>
889
            </fo:table-body>
890
        </fo:table>
891
    </xsl:template>
892
    <xsl:template name="headerTeacher">
893
        <fo:block text-align="left" border-bottom="1px solid #58585A">
894
            <fo:table width="100%" table-layout="fixed" >
1549 jmachado 895
                <fo:table-column column-width="80%"/>
1551 jmachado 896
                <fo:table-column column-width="20%"/>
1549 jmachado 897
 
898
 
899
                <fo:table-body>
900
                    <fo:table-row>
1551 jmachado 901
                        <fo:table-cell>
1549 jmachado 902
                            <fo:block>
1551 jmachado 903
                                <fo:external-graphic height="auto" width="auto"
904
                                                     content-height="40">
905
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 906
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/layout/themes/ipp/logo.jpg')
1551 jmachado 907
                                    </xsl:attribute>
908
                                </fo:external-graphic>
1549 jmachado 909
                            </fo:block>
1551 jmachado 910
                            <fo:block font-size="10px" padding="0px" text-align="left">
1553 jmachado 911
                                <fo:inline font-weight="bold"> Relatório de Avaliação Pedagógica</fo:inline>
1549 jmachado 912
                            </fo:block>
1551 jmachado 913
                            <fo:block  font-size="10px" padding="0px" margin-top="0px" text-align="left" >
1553 jmachado 914
                                <fo:inline>Avaliação pelos alunos do docente:</fo:inline>
1551 jmachado 915
                            </fo:block>
916
                        </fo:table-cell>
917
                        <fo:table-cell>
918
                            <fo:block font-size="10px" text-align="right" >
1553 jmachado 919
                                Resultados dos Inquéritos Pedagógicos
1551 jmachado 920
                            </fo:block>
921
                            <fo:block font-size="10px" padding="0px" margin-top="0px" text-align="right" >
922
                                <fo:inline font-weight="bold">Ano letivo:</fo:inline> <xsl:value-of select="$anoLectivo"/>
923
                            </fo:block>
924
                        </fo:table-cell>
1549 jmachado 925
 
1551 jmachado 926
                    </fo:table-row>
927
                    <fo:table-row background-color="#fff9ea">
928
                        <fo:table-cell>
929
                            <fo:block font-size="12px" padding="2px" margin-top="0px" >
1553 jmachado 930
                                <fo:inline text-align="left"><xsl:value-of select="$nomeDocente"/> / Número: <xsl:value-of select="$numeroDocente"/></fo:inline>
1551 jmachado 931
                            </fo:block>
1549 jmachado 932
                        </fo:table-cell>
1551 jmachado 933
                        <fo:table-cell>
934
                            <fo:block font-size="12px" padding="2px" margin-top="0px" text-align="right" >
935
                                <fo:inline>Pagina: <fo:page-number/></fo:inline>
1549 jmachado 936
                            </fo:block>
937
                        </fo:table-cell>
1551 jmachado 938
 
1549 jmachado 939
                    </fo:table-row>
1551 jmachado 940
 
1549 jmachado 941
                </fo:table-body>
942
            </fo:table>
943
 
944
 
945
 
946
 
1551 jmachado 947
        </fo:block>
1549 jmachado 948
    </xsl:template>
949
 
950
 
1554 jmachado 951
    <xsl:variable name="backgroundHeader">#FFEAAE</xsl:variable>
952
    <xsl:variable name="backgroundNormal">#FFFFFF</xsl:variable>
953
    <xsl:variable name="backgroundFooter">#FFEAAE</xsl:variable>
954
    <xsl:variable name="borderInHeader">2px solid black</xsl:variable>
955
    <xsl:variable name="borderInCell">1px dashed black</xsl:variable>
956
    <xsl:variable name="borderInFooter">2px solid black</xsl:variable>
957
    <xsl:variable name="borderInCellVertical">1px solid black</xsl:variable>
958
    <xsl:variable name="borderTable">2px solid black</xsl:variable>
959
 
1553 jmachado 960
    <xsl:template match="*" mode="DataTable">
1554 jmachado 961
        <xsl:param name="firstColPercentSize"></xsl:param>
962
 
963
 
964
        <fo:table width="100%" table-layout="auto" font-size="7pt">
1553 jmachado 965
            <xsl:attribute name="border"><xsl:value-of select="$borderTable"/></xsl:attribute>
1554 jmachado 966
            <xsl:for-each select="./rows/row[1]/cols/col">
967
                <xsl:choose>
968
                    <xsl:when test="$firstColPercentSize != '' and position() = 1">
969
                        <fo:table-column column-width="{$firstColPercentSize}"/>
970
                    </xsl:when>
971
                    <xsl:otherwise><fo:table-column/></xsl:otherwise>
972
                </xsl:choose>
973
 
1553 jmachado 974
            </xsl:for-each>
975
            <fo:table-body>
976
                <xsl:for-each select="./rows/row">
977
                    <xsl:variable name="rowPosition"><xsl:value-of select="position()"/></xsl:variable>
978
                    <xsl:variable name="lastRowPosition"><xsl:value-of select="last()"/></xsl:variable>
979
                    <fo:table-row background-color="{$backgroundHeader}">
980
                        <xsl:choose>
981
                            <xsl:when test="./type='header'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundHeader"/></xsl:attribute></xsl:when>
982
                            <xsl:when test="./type='normal'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundNormal"/></xsl:attribute></xsl:when>
983
                            <xsl:when test="./type='footer'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundFooter"/></xsl:attribute></xsl:when>
984
                        </xsl:choose>
985
                        <xsl:for-each select="./cols/col">
1554 jmachado 986
                            <fo:table-cell padding="0" display-align="center">
987
                                <xsl:if test="./backgroundColor != ''">
988
                                    <xsl:attribute name="background-color"><xsl:value-of select="./backgroundColor"/></xsl:attribute>
989
                                </xsl:if>
1553 jmachado 990
                                <xsl:choose>
991
                                    <xsl:when test="../../type='header'"><xsl:attribute name="border"><xsl:value-of select="$borderInHeader"/></xsl:attribute></xsl:when>
992
                                    <xsl:when test="../../type='normal'"><xsl:attribute name="border"><xsl:value-of select="$borderInCell"/></xsl:attribute></xsl:when>
993
                                    <xsl:when test="../../type='footer'"><xsl:attribute name="border"><xsl:value-of select="$borderInFooter"/></xsl:attribute></xsl:when>
994
                                </xsl:choose>
995
 
996
 
997
 
998
 
999
                                <xsl:choose>
1000
                                    <xsl:when test="./align='left'"><xsl:attribute name="text-align">start</xsl:attribute></xsl:when>
1001
                                    <xsl:when test="./align='right'"><xsl:attribute name="text-align">end</xsl:attribute></xsl:when>
1002
                                </xsl:choose>
1003
                                <xsl:if test="../../cols/col/type = 'percentage' and ./type != 'percentage'">
1554 jmachado 1004
                                    <xsl:attribute name="padding-top">2px</xsl:attribute>
1553 jmachado 1005
                                </xsl:if>
1006
 
1007
 
1008
                                <xsl:if test="../../type='normal'">
1009
                                    <xsl:if test="./type='label' and position()=1">
1010
                                        <xsl:attribute name="border-right"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1011
                                    </xsl:if>
1012
                                    <xsl:if test="./type='label' and position()=last()">
1013
                                        <xsl:attribute name="border-left"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1014
                                    </xsl:if>
1015
                                    <xsl:if test="../../../row[$rowPosition+1]/type='normal'">
1016
                                        <xsl:attribute name="border-bottom"><xsl:value-of select="$borderInCell"/></xsl:attribute>
1017
                                    </xsl:if>
1018
                                </xsl:if>
1019
 
1020
                                <xsl:if test="../../../row[$rowPosition - 1]/type='header'">
1021
                                    <xsl:attribute name="border-top"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1022
                                </xsl:if>
1023
                                <xsl:if test="../../../row[$rowPosition +1]/type='footer'">
1024
                                    <xsl:attribute name="border-bottom"><xsl:value-of select="$borderInFooter"/></xsl:attribute>
1025
                                </xsl:if>
1026
 
1027
 
1028
                                <xsl:if test="../col[position() + 1 != last()]">
1029
                                    <xsl:attribute name="border-right"><xsl:value-of select="$borderInCellVertical"/></xsl:attribute>
1030
                                </xsl:if>
1031
 
1032
 
1033
 
1034
 
1035
                                <fo:block-container margin="0" padding="0">
1036
                                <xsl:choose>
1554 jmachado 1037
                                    <xsl:when test="./type='text'"><fo:block margin="0"  padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
1553 jmachado 1038
                                    <xsl:when test="./type='number'"><fo:block margin="0"  padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
1554 jmachado 1039
                                    <xsl:when test="./type='label'"><fo:block margin="0"  padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
1553 jmachado 1040
                                    <xsl:when test="./type='percentage'">
1041
                                        <xsl:attribute name="text-align">left</xsl:attribute>
1042
                                        <xsl:attribute name="padding">0</xsl:attribute>
1043
                                        <xsl:call-template name="barraPercentil">
1044
                                            <xsl:with-param name="valor" select="./value"/>
1554 jmachado 1045
                                            <xsl:with-param name="colors" select="./usePercentageColor"/>
1553 jmachado 1046
                                        </xsl:call-template>
1047
                                    </xsl:when>
1554 jmachado 1048
                                    <xsl:when test="./type='percentageDefined'">
1049
                                        <xsl:attribute name="text-align">left</xsl:attribute>
1050
                                        <xsl:attribute name="padding">0</xsl:attribute>
1051
                                        <xsl:call-template name="barraPercentilDefined">
1052
                                            <xsl:with-param name="valor" select="./value"/>
1053
                                            <xsl:with-param name="percentDefined" select="./percentDefined"/>
1054
                                            <xsl:with-param name="colors" select="./usePercentageColor"/>
1055
                                        </xsl:call-template>
1056
                                    </xsl:when>
1553 jmachado 1057
                                </xsl:choose>
1058
 
1059
                            </fo:block-container>
1060
 
1061
 
1062
                            </fo:table-cell>
1063
                        </xsl:for-each>
1064
                    </fo:table-row>
1065
                </xsl:for-each>
1066
            </fo:table-body>
1067
        </fo:table>
1068
    </xsl:template>
1069
 
1070
 
1071
 
1549 jmachado 1072
</xsl:stylesheet>