xref: /webtrees/resources/xml/reports/fact_sources.xml (revision d0c1a61ef810518d72356545b8b85abf2582ef6a)
1<?xml version="1.0" encoding="UTF-8" ?>
2<Report>
3	<Title><var var="I18N::translate('Source')" /></Title>
4	<Description><var var="I18N::translate('A report of facts which are supported by a given source.')" /></Description>
5	<Input name="sid" lookup="SOUR" default="" type="text"><var var="I18N::translate('Find a source')" /></Input>
6	<Input name="stype" type="select" default="facts" options="facts=>I18N::translate('facts')|records=>I18N::translate('records')"><var var="I18N::translate('Source type')" /></Input>
7	<Input name="sortby" type="select" default="BIRT:DATE" options="NAME=>I18N::translate('sort by name')|BIRT:DATE=>I18N::translate('sort by date of birth')"><var var="I18N::translate('Sort order')" /></Input>
8	<Input name="pageSize" type="select" options="A4=>I18N::translateContext('paper size','A4')|A3=>I18N::translateContext('paper size', 'A3')|US-Letter=>I18N::translateContext('paper size','Letter')|US-Tabloid=>I18N::translateContext('paper size','Tabloid')"><var var="I18N::translate('Page size')" /></Input>
9	<!--
10	<Input name="fonts" type="select" default="dejavusans" options="arialunicid0=>I18N::translateContext('font name', 'Arial')|dejavusans=>I18N::translateContext('font name', 'DejaVu')|helvetica=>I18N::translateContext('font name', 'Helvetica')"><var var="I18N::translate('Font')"/></Input>
11	-->
12	<SetVar name="fonts" value="dejavusans" />
13
14	<!-- Header -->
15	<Style name="header" font="$fonts" size="18" style="b" />
16	<!-- Source Title -->
17	<Style name="header2" font="$fonts" size="14" style="b" />
18	<!-- Name of the List Type. INDI or FAM -->
19	<Style name="listtype" font="$fonts" size="12" style="b" />
20	<!-- Page numbers text -->
21	<Style name="pagenum" font="$fonts" size="8" />
22	<!-- Generated by style - required style name by the generator -->
23	<Style name="genby" font="$fonts" size="8" />
24	<!-- Date Text - CSS Style name -->
25	<Style name="date" font="$fonts" size="8"/>
26	<!-- Column list labels - CSS Style name -->
27	<Style name="list_label" font="$fonts" size="9" style="b"/>
28	<!-- List values - CSS Style name -->
29	<Style name="list_value" font="$fonts" size="8"/>
30
31	<SetVar name="nameindi" value="200" />
32	<SetVar name="datebirth" value="120" />
33	<SetVar name="namefam" value="$nameindi + $datebirth" />
34	<SetVar name="fact" value="100" />
35	<SetVar name="dateevent" value="110" />
36	<SetVar name="vspace" value="5" />
37	<SetVar name="printedsource" value="0" />
38	<SetVar name="moresourcespaceindi" value="$nameindi + $datebirth" />
39	<SetVar name="ignore" value="CHAN,CHIL,FAMC,FAMS,HUSB,OBJE,RESN,SEX,SOUR,TITL,WIFE,_UID,_WT_OBJE_SORT"/>
40
41	<Doc pageSize="$pageSize" orientation="landscape">
42		<Header>
43			<Cell align="center" newline="1" style="header"><var var="I18N::translate('Source')" /></Cell>
44			<Cell align="rightrtl" newline="1" style="pagenum"><var var="I18N::translate('Page')" /> <PageNum /> <var var="I18N::translate('of')" /> <TotalPages /></Cell>
45			<!-- Source Title -->
46			<Gedcom id="$sid">
47				<Cell align="center" newline="1" style="header2"><GedcomValue tag="TITL" /></Cell>
48			</Gedcom>
49		</Header>
50
51		<Body>
52		<if condition="$stype=='facts'">
53			<!-- List type -->
54			<Cell align="center" newline="1" style="listtype"><var var="I18N::translate('Individuals')" /></Cell>
55			<TextBox height="$vspace" newline="1" padding="0"/>
56
57			<!-- Individual Name -->
58			<SetVar name="fill" value="" />
59			<if condition="$sortby=='NAME'">
60				<SetVar name="fill" value="#AAAAAA" />
61			</if>
62			<Cell bgcolor="$fill" border="1" style="list_label" width="$nameindi"><var var="I18N::translate('Name')" /></Cell>
63			<!-- Birth date -->
64			<SetVar name="fill" value="" />
65			<if condition="$sortby=='BIRT:DATE'">
66				<SetVar name="fill" value="#AAAAAA" />
67			</if>
68			<Cell bgcolor="$fill" border="1" style="list_label" width="$datebirth"><var var="I18N::translate('Date of birth')" /></Cell>
69			<!-- Name of the fact that contains the source -->
70			<Cell border="1" style="list_label" width="$fact"><var var="I18N::translate('Event')" /></Cell>
71			<!-- Date of the fact -->
72			<Cell border="1" style="list_label" width="$dateevent"><var var="I18N::translate('Date')" /></Cell>
73			<!-- Detailed source text -->
74			<Cell border="1" newline="1" style="list_label"><var var="I18N::translate('Citation details')" /></Cell>
75			<TextBox height="$vspace" newline="1" padding="0"/>
76
77			<!-- Individual List -->
78			<List list="individual" filter1=":SOUR CONTAINS @$sid@" sortby="$sortby">
79				<SetVar name="moresource" value="0" />
80				<SetVar name="printsource" value="0" />
81				<!-- Printed List counter -->
82				<SetVar name="printedsource" value="$printedsource + 1" />
83
84				<!-- Individual Name -->
85				<Cell style="list_value" width="$nameindi"><GetPersonName id="" /></Cell>
86				<!-- Birth date -->
87				<Cell style="list_value" width="$datebirth"><GedcomValue tag="BIRT:DATE" /></Cell>
88				<Facts ignore="$ignore">
89					<SetVar name="printfact" value="0" />
90					<RepeatTag tag="@fact:SOUR">
91						<Gedcom id="@SOUR">
92							<if condition="@ID==$sid">
93								<SetVar name="printfact" value="1" />
94							</if>
95						</Gedcom>
96					</RepeatTag>
97
98					<if condition="$printfact==1">
99						<SetVar name="printsource" value="0" />
100						<!-- Indent the fact line if more then one fact has source -->
101						<if condition="$moresource==1">
102							<Cell style="list_value" width="$moresourcespaceindi"> </Cell>
103						</if>
104
105						<!-- Name of the fact that contains the source -->
106						<Cell style="list_value" width="$fact"><var var="@fact" /></Cell>
107						<!-- Date of the fact -->
108						<Cell style="list_value" width="$dateevent"><GedcomValue tag="@fact:DATE"/></Cell>
109						<!-- Detailed source text -->
110						<Cell style="list_value" newline="1">
111							<SetVar name="repeatedSource" value="0" />
112							<RepeatTag tag="@fact:SOUR">
113								<Gedcom id="@SOUR">
114									<if condition="@ID==$sid">
115										<SetVar name="printsource" value="1" />
116									</if>
117								</Gedcom>
118								<if condition="$printsource==1">
119									<if condition="$repeatedSource==1">; </if>
120									<if condition="@SOUR:PAGE!='' or @SOUR:DATA:TEXT!=''">
121										<SetVar name="repeatedSource" value="1" />
122									</if>
123									<GedcomValue tag="SOUR:PAGE"/>
124									<if condition="@SOUR:DATA:TEXT!=''">
125										<if condition="@SOUR:PAGE!=''">
126											<br />
127										</if>
128										<GedcomValue tag="SOUR:DATA:TEXT" />
129									</if>
130									<SetVar name="printsource" value="0" />
131								</if>
132							</RepeatTag>
133						</Cell>
134						<SetVar name="moresource" value="1" />
135					</if>
136					<SetVar name="printfact" value="0" />
137				</Facts>
138			</List>
139
140			<!-- Print the list counter -->
141			<if condition="$printedsource==0">
142				<Cell align="rightrtl" newline="1" style="list_label"><var var="I18N::translate('Total individuals')"/>: 0</Cell>
143			</if>
144			<if condition="$printedsource > 0">
145				<TextBox height="$vspace" newline="1" padding="0"/>
146				<Cell align="rightrtl" newline="1" style="list_label"><var var="I18N::translate('Total individuals')"/>: <var var="printedsource" /></Cell>
147			</if>
148
149			<NewPage />
150			<!-- Family List -->
151			<TextBox height="$vspace" newline="1" padding="0"/>
152			<Cell align="center" newline="1" style="listtype"><var var="I18N::translate('Families')" /></Cell>
153			<TextBox height="$vspace" newline="1" padding="0"/>
154			<!-- Family Name -->
155			<Cell border="1" style="list_label" width="$namefam"><var var="I18N::translate('Name')" /></Cell>
156			<!-- Name of the fact that contains the source -->
157			<Cell border="1" style="list_label" width="$fact"><var var="I18N::translate('Event')" /></Cell>
158			<!-- Date of the fact -->
159			<Cell bgcolor="#AAAAAA" border="1" style="list_label" width="$dateevent"><var var="I18N::translate('Date')" /></Cell>
160			<!-- Detailed source text -->
161			<Cell border="1" newline="1" style="list_label"><var var="I18N::translate('Citation details')" /></Cell>
162
163			<!-- Family List -->
164			<TextBox height="$vspace" newline="1" padding="0"/>
165			<SetVar name="printedsource" value="0" />
166			<List list="family" filter1=":SOUR CONTAINS @$sid@" sortby="MARR:DATE">
167				<SetVar name="moresource" value="0" />
168				<SetVar name="printsource" value="0" />
169				<!-- Printed List counter -->
170				<SetVar name="printedsource" value="$printedsource + 1" />
171
172				<!-- Family Name -->
173				<Cell style="list_value" width="$namefam"><GetPersonName id="" /></Cell>
174				<Facts ignore="$ignore">
175					<SetVar name="printfact" value="0" />
176					<RepeatTag tag="@fact:SOUR">
177						<Gedcom id="@SOUR">
178							<if condition="@ID==$sid">
179								<SetVar name="printfact" value="1" />
180							</if>
181						</Gedcom>
182					</RepeatTag>
183
184					<if condition="$printfact==1">
185						<SetVar name="printsource" value="0" />
186						<!-- Indent the fact line if more then one fact has source -->
187						<if condition="$moresource==1">
188							<Cell style="list_value" width="$namefam"> </Cell>
189						</if>
190
191						<!-- Name of the fact that contains the source -->
192						<Cell style="list_value" width="$fact">
193							<if condition="@fact=='MARR'">
194								<!-- Print different type of marriages -->
195								<if condition="@MARR:TYPE==''">
196									<var var="@fact" />
197								</if>
198								<if condition="@MARR:TYPE=='Religious'">
199									<var var="I18N::translate('Religious marriage')" />
200								</if>
201								<if condition="@MARR:TYPE=='Civil'">
202									<var var="I18N::translate('Civil marriage')" />
203								</if>
204								<if condition="@MARR:TYPE=='Partners'">
205									<var var="I18N::translate('Registered partnership')" />
206								</if>
207							</if>
208							<if condition="@fact!='MARR'">
209								<var var="@fact" />
210							</if>
211						</Cell>
212
213						<!-- Date of the fact -->
214						<Cell style="list_value" width="$dateevent"><GedcomValue tag="@fact:DATE"/></Cell>
215						<!-- Detailed source text -->
216						<Cell style="list_value" newline="1">
217							<SetVar name="repeatedSource" value="0" />
218							<RepeatTag tag="@fact:SOUR">
219								<Gedcom id="@SOUR">
220									<if condition="@ID==$sid">
221										<SetVar name="printsource" value="1" />
222									</if>
223								</Gedcom>
224								<if condition="$printsource==1">
225									<if condition="$repeatedSource==1">; </if>
226									<if condition="@SOUR:PAGE!='' or @SOUR:DATA:TEXT!=''">
227										<SetVar name="repeatedSource" value="1" />
228									</if>
229									<GedcomValue tag="SOUR:PAGE"/>
230									<if condition="@SOUR:DATA:TEXT!=''">
231										<if condition="@SOUR:PAGE!=''">
232											<br />
233										</if>
234										<GedcomValue tag="SOUR:DATA:TEXT" />
235									</if>
236									<SetVar name="printsource" value="0" />
237								</if>
238							</RepeatTag>
239						</Cell>
240						<SetVar name="moresource" value="1" />
241					</if>
242					<SetVar name="printfact" value="0" />
243				</Facts>
244			</List>
245
246			<!-- Print the list counter -->
247			<if condition="$printedsource==0">
248				<Cell align="rightrtl" newline="1" style="list_label"><var var="I18N::translate('Total families')"/>: 0</Cell>
249			</if>
250			<if condition="$printedsource > 0">
251				<TextBox height="$vspace" newline="1" padding="0"/>
252				<Cell align="rightrtl" newline="1" style="list_label"><var var="I18N::translate('Total families')"/>: <var var="printedsource" /></Cell>
253			</if>
254			<TextBox height="$vspace" newline="1" padding="0"/>
255		</if>
256		<if condition="$stype=='records'">
257			<!-- List type -->
258			<Cell align="center" newline="1" style="listtype"><var var="I18N::translate('Individuals')" /></Cell>
259			<TextBox height="$vspace" newline="1" padding="0"/>
260
261			<!-- Individual Name -->
262			<SetVar name="fill" value="" />
263			<if condition="$sortby=='NAME'">
264				<SetVar name="fill" value="#AAAAAA" />
265			</if>
266			<Cell bgcolor="$fill" border="1" style="list_label" width="$nameindi"><var var="I18N::translate('Name')" /></Cell>
267			<!-- Birth date -->
268			<SetVar name="fill" value="" />
269			<if condition="$sortby=='BIRT:DATE'">
270				<SetVar name="fill" value="#AAAAAA" />
271			</if>
272			<Cell bgcolor="$fill" border="1" style="list_label" width="$fact"><var var="I18N::translate('Date of birth')" /></Cell>
273			<Cell border="1" style="list_label" width="$dateevent"><var var="I18N::translate('Place of birth')" /></Cell>
274			<Cell border="1" style="list_label" width="$fact"><var var="I18N::translate('Date of death')" /></Cell>
275			<Cell border="1" style="list_label" width="$dateevent"><var var="I18N::translate('Place of death')" /></Cell>
276			<!-- Detailed source text -->
277			<Cell border="1" newline="1" style="list_label"><var var="I18N::translate('Citation details')" /></Cell>
278			<TextBox height="$vspace" newline="1" padding="0"/>
279
280			<!-- Individual List -->
281			<List list="individual" filter1="SOUR CONTAINS @$sid@" sortby="$sortby">
282				<!-- Printed List counter -->
283				<SetVar name="printedsource" value="$printedsource + 1" />
284				<!-- Individual Name -->
285				<Cell style="list_value" width="$nameindi"><GetPersonName id="" /></Cell>
286				<!-- Birth date -->
287				<Cell style="list_value" width="$dateevent"><GedcomValue tag="BIRT:DATE" /></Cell>
288				<!-- Birth place -->
289				<Cell style="list_value" width="$fact"><GedcomValue tag="BIRT:PLAC" /></Cell>
290				<!-- Death date -->
291				<Cell style="list_value" width="$dateevent"><GedcomValue tag="DEAT:DATE" /></Cell>
292				<!-- Death place -->
293				<Cell style="list_value" width="$fact"><GedcomValue tag="DEAT:PLAC" /></Cell>
294				<!-- Detailed source text -->
295				<Cell style="list_value" newline="1">
296					<GedcomValue tag="SOUR:PAGE"/>
297					<if condition="@SOUR:DATA:TEXT!=''">
298						<br /><GedcomValue tag="SOUR:DATA:TEXT"/>
299					</if>
300				</Cell>
301			</List>
302
303			<!-- Print the list counter -->
304			<if condition="$printedsource==0">
305				<Cell align="rightrtl" newline="1" style="list_label"><var var="I18N::translate('Total individuals')"/>: 0</Cell>
306			</if>
307			<if condition="$printedsource > 0">
308				<TextBox height="$vspace" newline="1" padding="0"/>
309				<Cell align="rightrtl" newline="1" style="list_label"><var var="I18N::translate('Total individuals')"/>: <var var="printedsource" /></Cell>
310			</if>
311			<NewPage />
312			<!-- Family List -->
313			<TextBox height="$vspace" newline="1" padding="0"/>
314			<Cell align="center" newline="1" style="listtype"><var var="I18N::translate('Families')" /></Cell>
315			<TextBox height="$vspace" newline="1" padding="0"/>
316			<!-- Family Name -->
317			<Cell border="1" style="list_label" width="$namefam"><var var="I18N::translate('Name')" /></Cell>
318			<!-- Name of the fact that contains the source -->
319			<Cell bgcolor="#AAAAAA" border="1" style="list_label" width="$dateevent"><var var="I18N::translate('Date of marriage')" /></Cell>
320			<!-- Date of the fact -->
321			<Cell border="1" style="list_label" width="$fact"><var var="I18N::translate('Place of marriage')" /></Cell>
322			<!-- Detailed source text -->
323			<Cell border="1" newline="1" style="list_label"><var var="I18N::translate('Citation details')" /></Cell>
324
325			<!-- Family List -->
326			<TextBox height="$vspace" newline="1" padding="0"/>
327			<SetVar name="printedsource" value="0" />
328			<List list="family" filter1="SOUR CONTAINS @$sid@" sortby="MARR:DATE">
329				<SetVar name="printsource" value="0" />
330				<!-- Printed List counter -->
331				<SetVar name="printedsource" value="$printedsource + 1" />
332
333				<!-- Family Name -->
334				<Cell style="list_value" width="$namefam"><GetPersonName id="" /></Cell>
335				<!-- Date of the fact -->
336				<Cell style="list_value" width="$dateevent"><GedcomValue tag="MARR:DATE"/></Cell>
337				<!-- Place of the fact -->
338				<Cell style="list_value" width="$fact"><GedcomValue tag="MARR:PLAC"/></Cell>
339				<!-- Detailed source text -->
340				<Cell style="list_value" newline="1">
341					<GedcomValue tag="SOUR:PAGE"/>
342					<if condition="@SOUR:DATA:TEXT!=''">
343						<br /><GedcomValue tag="SOUR:DATA:TEXT"/>
344					</if>
345				</Cell>
346			</List>
347
348			<!-- Print the list counter -->
349			<if condition="$printedsource==0">
350				<Cell align="rightrtl" newline="1" style="list_label"><var var="I18N::translate('Total families')"/>: 0</Cell>
351			</if>
352			<if condition="$printedsource > 0">
353				<TextBox height="$vspace" newline="1" padding="0"/>
354				<Cell align="rightrtl" newline="1" style="list_label"><var var="I18N::translate('Total families')"/>: <var var="printedsource" /></Cell>
355			</if>
356			<TextBox height="$vspace" newline="1" padding="0"/>
357		</if>
358		</Body>
359
360		<Footer>
361			<Cell align="rightrtl" newline="1" style="date"><Now/></Cell>
362		</Footer>
363
364	</Doc>
365</Report>
366