1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
<metal:block
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="schooltool">
<pageTemplate
i18n:domain="schooltool"
tal:attributes="id view/__name__"
tal:define="top_bar view/top_bar;
header view/header;
bottom_bar view/bottom_bar;
top_line view/top_line;
bottom_line view/bottom_line;
frame view/frame;">
<pageGraphics>
<!-- Top bar -->
<fill color="top_bar.background" />
<stroke color="top_bar.background" />
<rect
tal:attributes="x top_bar/x;
y top_bar/y;
width top_bar/width;
height top_bar/height;"
fill="true" stroke="true" />
<fill color="top_bar.text" />
<setFont
name="Ubuntu_Regular"
tal:attributes="size top_bar/fontSize" />
<drawString
tal:define="top_left view/slots/top_left|nothing"
tal:condition="top_left"
tal:content="top_left"
tal:attributes="x top_bar/slots/left/x;
y top_bar/slots/left/y;" />
<drawCenteredString
tal:define="top_center view/slots/top_center|nothing"
tal:condition="top_center"
tal:content="top_center"
tal:attributes="x top_bar/slots/center/x;
y top_bar/slots/center/y;" />
<drawRightString
tal:define="top_right view/slots/top_right|nothing"
tal:condition="top_right"
tal:content="top_right"
tal:attributes="x top_bar/slots/right/x;
y top_bar/slots/right/y;" />
<!-- Bottom bar -->
<fill color="bottom_bar.background" />
<stroke color="bottom_bar.background" />
<rect
tal:attributes="x bottom_bar/x;
y bottom_bar/y;
width bottom_bar/width;
height bottom_bar/height;"
fill="true" stroke="true" />
<fill color="bottom_bar.text" />
<setFont
name="Ubuntu_Regular"
tal:attributes="size bottom_bar/fontSize" />
<image
file="[schooltool.skin.flourish]/resources/logo_bw.png"
tal:attributes="x bottom_bar/slots/left/x;
y bottom_bar/y;
height bottom_bar/height;"
preserveAspectRatio="True" />
<place
tal:attributes="x bottom_bar/x;
y bottom_bar/y;
width bottom_bar/width;
height bottom_bar/height">
<para style="bottom_bar.page_number" i18n:translate="">
Page <pageNumber i18n:name="page_number"/>
</para>
</place>
<!-- Header (title and subtitle) -->
<fill color="background" />
<stroke color="background" />
<rect
tal:attributes="x header/x;
y header/y;
width header/width;
height header/height;"
fill="true" stroke="true" />
<fill color="text" />
<setFont
name="Ubuntu_Regular"
tal:attributes="size header/title/fontSize" />
<tal:loop repeat="line header/title/lines">
<drawString
tal:content="line/content"
tal:attributes="x line/x;
y line/y;" />
</tal:loop>
<setFont
name="Ubuntu_Regular"
tal:attributes="size header/subtitle/fontSize" />
<tal:loop repeat="line header/subtitle/lines">
<drawString
tal:content="line/content"
tal:attributes="x line/x;
y line/y;" />
</tal:loop>
<setFont
name="Ubuntu_Regular"
tal:attributes="size header/extra_subtitle/fontSize" />
<tal:loop repeat="line header/extra_subtitle/lines">
<drawRightString
tal:content="line/content"
tal:attributes="x line/x;
y line/y;" />
</tal:loop>
<image
tal:condition="header/logo"
tal:attributes="file header/logo/logo_data;
x header/logo/x;
y header/logo/y;
height header/logo/height;
width header/logo/width;"
/>
<stroke color="separator" />
<lineMode width="1" cap="square" />
<lines tal:content="bottom_line/coords" />
</pageGraphics>
<!-- Content frame -->
<frame
tal:attributes="x1 frame/x;
y1 frame/y;
width frame/width;
height frame/height;
id view/__name__" />
</pageTemplate>
</metal:block>
|