xref: /webtrees/resources/xml/reports/relative_ext_report.xml (revision 2ebb07b4bd8cf7010946ea4d75bb6160666157f6)
1<?xml version="1.0" encoding="UTF-8" ?>
2<Report>
3	<Title><var var="I18N::translate('Related individuals')" /></Title>
4	<Description><var var="I18N::translate('A report of the individuals that are closely related to an individual.')" /></Description>
5	<Input name="pid" lookup="INDI" type="text"><var var="I18N::translate('Individual')" /></Input>
6	<Input name="relatives" type="select" options="child-family=>I18N::translate('Parents and siblings')|spouse-family=>I18N::translate('Spouses and children')|direct-ancestors=>I18N::translate('Direct line ancestors')|ancestors=>I18N::translate('Direct line ancestors and their families')|descendants=>I18N::translate('Descendants')|all=>I18N::translate('All')"><var var="I18N::translate('Choose relatives')" /></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')|DEAT:DATE=>I18N::translate('sort by date of death')"><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="14" />
16	<!-- Page numbers text -->
17	<Style name="pagenum" font="$fonts" size="8" />
18	<!-- Generated by style - required style name by the generator -->
19	<Style name="genby" font="$fonts" size="8" />
20	<!-- Date text -->
21	<Style name="date" font="$fonts" size="8"/>
22	<Style name="text" font="$fonts" size="10" />
23	<Style name="bold" font="$fonts" size="10" style="b" />
24	<Style name="mini" font="$fonts" size="8" />
25	<Style name="minibold" font="$fonts" size="8" style="b" />
26	<Style name="label" font="$fonts" size="10" style="b" />
27
28	<SetVar name="height1" value="14" />
29	<SetVar name="height2" value="10" />
30	<SetVar name="width1" value="45" />
31	<SetVar name="width2" value="195" />
32	<SetVar name="width3" value="120" />
33	<SetVar name="width4" value="120" />
34	<SetVar name="width5" value="150" />
35	<SetVar name="width6" value="150" />
36	<SetVar name="widthB2" value="280" />
37	<SetVar name="widthB3" value="40" />
38	<SetVar name="widthB4" value="375" />
39	<SetVar name="leftbdp" value="$width1+$width2" />
40
41	<Doc pageSize="$pageSize" orientation="landscape">
42		<Header>
43			<Cell align="center" height="20" newline="1" style="header"><var var="I18N::translate('Related individuals')" /></Cell>
44			<Cell align="rightrtl" newline="1" style="pagenum"><var var="I18N::translate('Page')" /> <PageNum /> <var var="I18N::translate('of')" /> <TotalPages /></Cell>
45
46			<SetVar name="fill" value="" />
47			<if condition="$sortby=='NAME'">
48				<SetVar name="fill" value="#AAAAAA" />
49			</if>
50			<Cell bgcolor="$fill" border="1" height="$height1" style="label" width="$width2"> <var var="I18N::translate('Name')" /></Cell>
51
52			<SetVar name="fill" value="" />
53			<if condition="$sortby=='BIRT:DATE'">
54				<SetVar name="fill" value="#AAAAAA" />
55			</if>
56			<Cell bgcolor="$fill" border="1" height="$height1" style="label" width="$width3"> <var var="I18N::translate('Birth')" /></Cell>
57
58			<SetVar name="fill" value="" />
59			<if condition="$sortby=='DEAT:DATE'">
60				<SetVar name="fill" value="#AAAAAA" />
61			</if>
62			<Cell bgcolor="$fill" border="1" height="$height1" style="label" width="$width4"> <var var="I18N::translate('Death')" /></Cell>
63
64			<Cell border="1" height="$height1" style="label" width="$width5"> <var var="I18N::translate('Father')" /></Cell>
65			<Cell border="1" height="$height1" newline="1" style="label"> <var var="I18N::translate('Mother')" /></Cell>
66		</Header>
67
68		<Body>
69			<Relatives id="$pid" group="$relatives" sortby="$sortby">
70				<SetVar name="sex" value="@SEX" />
71				<!-- 1. Block -->
72				<TextBox height="$height1" width="$width2">
73					<Text style="bold"><GetPersonName id="" /></Text>
74				</TextBox>
75				<TextBox height="$height1" width="$width3">
76					<Text style="text"><GedcomValue tag="BIRT:DATE" truncate="20" /><br/></Text>
77					<Text style="mini"><GedcomValue tag="BIRT:PLAC" /></Text>
78				</TextBox>
79				<TextBox height="$height1" width="$width4">
80					<Text style="text"><GedcomValue tag="DEAT:DATE" truncate="20" /><br/></Text>
81					<Text style="mini"><GedcomValue tag="DEAT:PLAC" /></Text>
82				</TextBox>
83				<!-- If FAMC is empty all lines will be ignored. So, don't place any newline break in here -->
84				<Gedcom id="@FAMC">
85					<TextBox height="$height1" width="$width5">
86						<Gedcom id="@HUSB">
87							<Text style="text"><GetPersonName id="" /></Text>
88						</Gedcom>
89					</TextBox>
90					<TextBox height="$height1" newline="1">
91						<Gedcom id="@WIFE">
92							<Text style="text"><GetPersonName id="" /></Text>
93						</Gedcom>
94					</TextBox>
95				</Gedcom>
96				<!-- one way or the other, we need a new line -->
97				<if condition="@FAMC==''">
98					<TextBox height="2" newline="1"/>
99				</if>
100				<RepeatTag tag="FAMS">
101					<Gedcom id="@FAMS">
102						<TextBox height="$height2" left="$width1" width="$widthB2">
103							<if condition="$sex=='M'">
104								<Text style="minibold"><var var="I18N::translate('Wife')" />: </Text>
105								<Text style="mini"><GetPersonName id="@WIFE" /> <GedcomValue tag="MARR:DATE" />
106								</Text>
107							</if>
108							<if condition="$sex=='F'">
109								<Text style="minibold"><var var="I18N::translate('Husband')" />: </Text>
110								<Text style="mini"><GetPersonName id="@HUSB" /> <GedcomValue tag="MARR:DATE" />
111								</Text>
112							</if>
113						</TextBox>
114						<TextBox height="$height2" width="50">
115							<Text style="minibold"><var var="I18N::translate('Children')" />:</Text>
116						</TextBox>
117						<TextBox height="$height2" newline="1">
118							<SetVar name="morechildren" value="0" />
119							<RepeatTag tag="CHIL">
120								<Gedcom id="@CHIL">
121									<Text style="mini">
122										<!-- Print this only when more than one child exist -->
123										<if condition="$morechildren==1">, </if>
124										<GetPersonName id="" />
125									</Text>
126									<SetVar name="morechildren" value="1" />
127								</Gedcom>
128							</RepeatTag>
129						</TextBox>
130					</Gedcom>
131				</RepeatTag>
132
133				<!-- keep distance between line -->
134				<TextBox height="2" newline="1" padding="0"/>
135				<Line />
136				<TextBox height="2" newline="1" padding="0"/>
137
138			</Relatives>
139			<Cell align="rightrtl" height="15" newline="1" style="label">
140				<br /><var var="I18N::translate('Total individuals')" />: <ListTotal />
141			</Cell>
142		</Body>
143
144		<Footer>
145			<Cell align="rightrtl" newline="1" style="date"><Now /></Cell>
146		</Footer>
147	</Doc>
148</Report>
149