summaryrefslogtreecommitdiff
path: root/modules_v2/source_report/report.xml
blob: ee12240ab557614b73920c4f59e47dd99d5162cd (plain)
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<?xml version="1.0" encoding="UTF-8"?>
<Report>
	<!-- $Id$ -->
	<Title><var var="WT_I18N::translate('Sources report')" /></Title>
	<Description><var var="WT_I18N::translate('A report of individuals which are supported by a given source.')" /></Description>
	<Input name="sid" lookup="SOUR" default="" type="text"><var var="WT_I18N::translate('Find Source ID')" /></Input>
	<Input name="sortby" type="select" default="BIRT:DATE" options="NAME=>WT_I18N::translate('Name')|BIRT:DATE=>WT_I18N::translate('Date of birth')|DEAT:DATE=>WT_I18N::translate('Date of death')"><var var="WT_I18N::translate('Sort by')" /></Input>
	<Input name="pageSize" type="select" default="A4" options="letter=>WT_I18N::translate_c('paper size','Letter')|A3=>WT_I18N::translate_c('paper size', 'A3')|A4=>WT_I18N::translate_c('paper size','A4')|legal=>WT_I18N::translate_c('paper size','Legal')"><var var="WT_I18N::translate('Page size')" /></Input>
	<Input name="fonts" type="select" default="dejavusans" options="arialunicid0=>WT_I18N::translate_c('font name', 'Arial')|dejavusans=>WT_I18N::translate_c('font name', 'DejaVu')|helvetica=>WT_I18N::translate_c('font name', 'Helvetica')"><var var="WT_I18N::translate('Font')"/></Input>

	<!-- Header -->
	<Style name="header" font="$fonts" size="18" style="b" />
	<!-- Source Title -->
	<Style name="header2" font="$fonts" size="14" style="b" />
	<!-- Name of the List Type. INDI or FAM -->
	<Style name="listtype" font="$fonts" size="12" style="b" />
	<!-- Page numbers text -->
	<Style name="pagenum" font="$fonts" size="8" />
	<!-- Generated by style - required style name by the generator -->
	<Style name="genby" font="$fonts" size="8" />
	<!-- Date Text - CSS Style name -->
	<Style name="date" font="$fonts" size="8"/>
	<!-- Column list labels - CSS Style name -->
	<Style name="list_label" font="$fonts" size="9" style="b"/>
	<!-- List values - CSS Style name -->
	<Style name="list_value" font="$fonts" size="8"/>

	<SetVar name="nameindi" value="194" />
	<SetVar name="namefam" value="300" />
	<SetVar name="dateevent" value="110" />
	<SetVar name="fact" value="110" />
	<SetVar name="age" value="38" />
	<SetVar name="placeevent" value="107" />
	<SetVar name="vspace" value="5" />
	<SetVar name="printedsource" value="0" />
	<SetVar name="ignore" value="CHAN,CHIL,FAMC,FAMS,HUSB,NAME,NOTE,OBJE,RESN,SEX,SOUR,TITL,WIFE,_UID,_WT_OBJE_SORT"/>

	<Doc pageSize="$pageSize" orientation="landscape">
		<Header>
			<Cell align="center" newline="1" style="header"><var var="WT_I18N::translate('Sources')" /></Cell>
			<Cell align="rightrtl" newline="1" style="pagenum"><var var="WT_I18N::translate('Page')" /> <PageNum /> <var var="WT_I18N::translate('of')" /> <TotalPages /></Cell>
			<!-- Source Title -->
			<Gedcom id="$sid">
				<Cell align="center" newline="1" style="header2"><GedcomValue tag="TITL" /></Cell>
			</Gedcom>
		</Header>

		<Line />
		<Body>
			<!-- List type -->
			<Cell align="center" newline="1" style="listtype"><var var="WT_I18N::translate('Individuals')" /></Cell>
			<TextBox height="$vspace" newline="1" padding="0"/>

			<!-- Individual Name -->
			<SetVar name="fill" value="" />
			<if condition="$sortby=='NAME'">
				<SetVar name="fill" value="#AAAAAA" />
			</if>
			<Cell bgcolor="$fill" border="1" style="list_label" width="$nameindi"><var var="WT_I18N::translate('Name')" /></Cell>
			<!-- Birth date -->
			<SetVar name="fill" value="" />
			<if condition="$sortby=='BIRT:DATE'">
				<SetVar name="fill" value="#AAAAAA" />
			</if>
			<Cell bgcolor="$fill" border="1" style="list_label" width="$dateevent"><var var="WT_Gedcom_Tag::getLabel('BIRT:DATE')" /></Cell>
			<!-- Birth place -->
			<Cell border="1" style="list_label" width="$placeevent"><var var="WT_Gedcom_Tag::getLabel('BIRT:PLAC')" /></Cell>
			<!-- Death date -->
			<SetVar name="fill" value="" />
			<if condition="$sortby=='DEAT:DATE'">
				<SetVar name="fill" value="#AAAAAA" />
			</if>
			<Cell bgcolor="$fill" border="1" style="list_label" width="$dateevent"><var var="WT_Gedcom_Tag::getLabel('DEAT:DATE')" /></Cell>
			<Cell border="1" style="list_label" width="$age"><var var="WT_Gedcom_Tag::getLabel('AGE')" /></Cell>
			<!-- Death place -->
			<Cell border="1" style="list_label" width="$placeevent"><var var="WT_Gedcom_Tag::getLabel('DEAT:PLAC')" /></Cell>
			<!-- Detailed source text -->
			<Cell border="1" newline="1" style="list_label"><var var="WT_Gedcom_Tag::getLabel('SOUR:PAGE')" /></Cell>
			<TextBox height="$vspace" newline="1" padding="0"/>

			<!-- Individual List -->
			<List list="individual" filter1=":SOUR CONTAINS @$sid@" sortby="$sortby">
				<SetVar name="moresource" value="0" />
				<SetVar name="printsource" value="0" />
				<!-- Printed List counter -->
				<SetVar name="printedsource" value="$printedsource + 1" />
				<!-- Individual Name -->
				<Cell style="list_value" width="$nameindi"><GetPersonName id="" />
					<Gedcom id="@FAMC">
						<br /> <var var="WT_I18N::translate('Father')" />: <GetPersonName id="@HUSB"/>
						<br /> <var var="WT_I18N::translate('Mother')" />: <GetPersonName id="@WIFE"/>
					</Gedcom>
				</Cell>
				<!-- Birth  -->
				<Cell style="list_value" width="$dateevent"><GedcomValue tag="BIRT:DATE" /></Cell>
				<Cell style="list_value" width="$placeevent"><GedcomValue tag="BIRT:PLAC" /></Cell>
				<!-- Death  -->
				<Cell style="list_value" width="$dateevent"><GedcomValue tag="DEAT:DATE"/></Cell>
				<Cell style="list_value" width="$age"><AgeAtDeath /></Cell>
				<Cell style="list_value" width="$placeevent"><GedcomValue tag="DEAT:PLAC" /></Cell>
				<Cell style="list_value" newline="1">
				<Facts ignore="$ignore">
					<SetVar name="printfact" value="0" />
					<RepeatTag tag="@fact:SOUR">
						<Gedcom id="@SOUR">
							<if condition="@ID==$sid">
								<SetVar name="printfact" value="1" />
							</if>
						</Gedcom>
					</RepeatTag>
					<if condition="$printfact==1">
						<SetVar name="printsource" value="0" />
						<!-- Intend the fact line if more then one fact has source -->
						<if condition="$moresource==1">
							<br />
						</if>
						<!-- Detailed source text -->
						<RepeatTag tag="@fact:SOUR">
							<Gedcom id="@SOUR">
								<if condition="@ID==$sid">
									<SetVar name="printsource" value="1" />
								</if>
							</Gedcom>
							<if condition="$printsource==1">
								<if condition="@fact=='CHR'">
									<varLetter var="BIRT" /> <GedcomValue tag="SOUR:PAGE"/>
									<if condition="@SOUR:DATA:TEXT!=''">
										<br /><GedcomValue tag="SOUR:DATA:TEXT"/>
									</if>
								</if>
								<if condition="@fact=='BURI'">
									<varLetter var="DEAT" /> <GedcomValue tag="SOUR:PAGE"/>
									<if condition="@SOUR:DATA:TEXT!=''">
										<br /><GedcomValue tag="SOUR:DATA:TEXT"/>
									</if>
								</if>
								<SetVar name="printsource" value="0" />
							</if>
						</RepeatTag>
						<SetVar name="moresource" value="1" />
					</if>
					<SetVar name="printfact" value="0" />
				</Facts>
				</Cell>
				<Line />
			</List>

			<!-- Print the list counter -->
			<if condition="$printedsource==0">
				<Cell align="rightrtl" newline="1" style="list_label"><var var="WT_I18N::translate('Total individuals')"/>: 0</Cell>
			</if>
			<if condition="$printedsource > 0">
				<TextBox height="$vspace" newline="1" padding="0"/>
				<Cell align="rightrtl" newline="1" style="list_label"><var var="WT_I18N::translate('Total individuals')"/>: <var var="printedsource" /></Cell>
			</if>
			<NewPage />
			<!-- Family List -->
			<TextBox height="$vspace" newline="1" padding="0"/>
			<Cell align="center" newline="1" style="listtype"><var var="WT_I18N::translate('Families')" /></Cell>
			<TextBox height="$vspace" newline="1" padding="0"/>
			<!-- Family Name -->
			<Cell border="1" style="list_label" width="$namefam"><var var="WT_I18N::translate('Name')" /></Cell>
			<!-- Name of the fact that contains the source -->
			<Cell border="1" style="list_label" width="$fact"><var var="WT_I18N::translate('Event')" /></Cell>
			<!-- Date of the fact -->
			<Cell bgcolor="#AAAAAA" border="1" style="list_label" width="$dateevent"><var var="WT_Gedcom_Tag::getLabel('DATE')" /></Cell>
			<!-- Date of the fact -->
			<Cell border="1" style="list_label" width="$placeevent"><var var="WT_Gedcom_Tag::getLabel('PLAC')" /></Cell>
			<!-- Detailed source text -->
			<Cell border="1" newline="1" style="list_label"><var var="WT_Gedcom_Tag::getLabel('SOUR:PAGE')" /></Cell>

			<!-- Family List -->
			<TextBox height="$vspace" newline="1" padding="0"/>
			<SetVar name="printedsource" value="0" />
			<List list="family" filter1=":SOUR CONTAINS @$sid@" sortby="MARR:DATE">
				<SetVar name="moresource" value="0" />
				<SetVar name="printsource" value="0" />
				<!-- Printed List counter -->
				<SetVar name="printedsource" value="$printedsource + 1" />

				<!-- Family Name -->
				<Cell style="list_value" width="$namefam"><GetPersonName id="" />
					<Gedcom id="@HUSB:@FAMC">
							<br /> <var var="WT_I18N::translate('Husband\'s parents')" />: <GetPersonName id=""/>
					</Gedcom>
					<Gedcom id="@WIFE:@FAMC">
							<br /> <var var="WT_I18N::translate('Wife\'s parents')" />: <GetPersonName id=""/>
					</Gedcom>
				</Cell>
				<Facts ignore="$ignore">
					<SetVar name="printfact" value="0" />
					<RepeatTag tag="@fact:SOUR">
						<Gedcom id="@SOUR">
							<if condition="@ID==$sid">
								<SetVar name="printfact" value="1" />
							</if>
						</Gedcom>
					</RepeatTag>

					<if condition="$printfact==1">
						<SetVar name="printsource" value="0" />
						<!-- Intend the fact line if more then one fact has source -->
						<if condition="$moresource==1">
							<Cell style="list_value" width="$namefam"> </Cell>
						</if>

						<!-- Name of the fact that contains the source -->
						<Cell style="list_value" width="$fact">
							<if condition="@fact=='MARR'">
								<!-- Print different type of marriages -->
								<if condition="@MARR:TYPE==''">
									<var var="@fact" />
								</if>
								<if condition="@MARR:TYPE=='Religious'">
									<var var="WT_I18N::translate('Religious marriage')" />
								</if>
								<if condition="@MARR:TYPE=='Civil'">
									<var var="WT_I18N::translate('Civil marriage')" />
								</if>
								<if condition="@MARR:TYPE=='Partners'">
									<var var="WT_I18N::translate('Registered partnership')" />
								</if>
							</if>
							<if condition="@fact!='MARR'">
								<var var="@fact" />
							</if>
							<RepeatTag tag="@fact:NOTE">
								<if condition="@NOTE!=''">
									<br /><GedcomValue tag="NOTE"/>
								</if>
							</RepeatTag>
						</Cell>

						<!-- Date of the fact -->
						<Cell style="list_value" width="$dateevent"><GedcomValue tag="@fact:DATE"/></Cell>
						<!-- Place of the fact -->
						<Cell style="list_value" width="$placeevent"><GedcomValue tag="@fact:PLAC"/></Cell>
						<!-- Detailed source text -->
						<Cell style="list_value" newline="1">
							<RepeatTag tag="@fact:SOUR">
								<Gedcom id="@SOUR">
									<if condition="@ID==$sid">
										<SetVar name="printsource" value="1" />
									</if>
								</Gedcom>
								<if condition="$printsource==1">
									<GedcomValue tag="SOUR:PAGE"/>
									<if condition="@SOUR:DATA:TEXT!=''">
										<br /><GedcomValue tag="SOUR:DATA:TEXT"/>
									</if>
									<SetVar name="printsource" value="0" />
								</if>
							</RepeatTag>
						</Cell>
						<SetVar name="moresource" value="1" />
					</if>
					<SetVar name="printfact" value="0" />
				</Facts>
				<Line />
			</List>

			<!-- Print the list counter -->
			<if condition="$printedsource==0">
				<Cell align="rightrtl" newline="1" style="list_label"><var var="WT_I18N::translate('Total families')"/>: 0</Cell>
			</if>
			<if condition="$printedsource > 0">
				<TextBox height="$vspace" newline="1" padding="0"/>
				<Cell align="rightrtl" newline="1" style="list_label"><var var="WT_I18N::translate('Total families')"/>: <var var="printedsource" /></Cell>
			</if>
			<TextBox height="$vspace" newline="1" padding="0"/>
		</Body>

		<Footer>
			<Cell align="rightrtl" newline="1" style="date"><Now/></Cell>
		</Footer>

	</Doc>
</Report>