xref: /webtrees/resources/xml/reports/relative_ext_report.xml (revision afa67798854828b1edc33dd077960ec2b18e6140)
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	<if condition="$relatives=='child-family'"><SetVar name="explain" value="I18N::translate('Parents and siblings')"/></if>
42	<if condition="$relatives=='spouse-family'"><SetVar name="explain" value="I18N::translate('Spouses and children')"/></if>
43	<if condition="$relatives=='direct-ancestors'"><SetVar name="explain" value="I18N::translate('Direct line ancestors')"/></if>
44	<if condition="$relatives=='ancestors'"><SetVar name="explain" value="I18N::translate('Direct line ancestors and their families')"/></if>
45	<if condition="$relatives=='descendants'"><SetVar name="explain" value="I18N::translate('Descendants')"/></if>
46	<if condition="$relatives=='all'"><SetVar name="explain" value="I18N::translate('All')"/></if>
47
48	<Doc pageSize="$pageSize" orientation="landscape">
49		<Header>
50			<Cell align="center" height="20" newline="1" style="header"><GetPersonName id="$pid" /> — <var var="$explain"/></Cell>
51			<Cell align="rightrtl" newline="1" style="pagenum"><var var="I18N::translate('Page')" /> <PageNum /> <var var="I18N::translate('of')" /> <TotalPages /></Cell>
52
53			<SetVar name="fill" value="" />
54			<if condition="$sortby=='NAME'">
55				<SetVar name="fill" value="#AAAAAA" />
56			</if>
57			<Cell bgcolor="$fill" border="1" height="$height1" style="label" width="$width2"> <var var="I18N::translate('Name')" /></Cell>
58
59			<SetVar name="fill" value="" />
60			<if condition="$sortby=='BIRT:DATE'">
61				<SetVar name="fill" value="#AAAAAA" />
62			</if>
63			<Cell bgcolor="$fill" border="1" height="$height1" style="label" width="$width3"> <var var="I18N::translate('Birth')" /></Cell>
64
65			<SetVar name="fill" value="" />
66			<if condition="$sortby=='DEAT:DATE'">
67				<SetVar name="fill" value="#AAAAAA" />
68			</if>
69			<Cell bgcolor="$fill" border="1" height="$height1" style="label" width="$width4"> <var var="I18N::translate('Death')" /></Cell>
70
71			<Cell border="1" height="$height1" style="label" width="$width5"> <var var="I18N::translate('Father')" /></Cell>
72			<Cell border="1" height="$height1" newline="1" style="label"> <var var="I18N::translate('Mother')" /></Cell>
73		</Header>
74
75		<Body>
76			<Relatives id="$pid" group="$relatives" sortby="$sortby">
77				<SetVar name="sex" value="@SEX" />
78				<!-- 1. Block -->
79				<TextBox height="$height1" width="$width2">
80					<Text style="bold"><GetPersonName id="" /></Text>
81				</TextBox>
82				<TextBox height="$height1" width="$width3">
83					<Text style="text"><GedcomValue tag="BIRT:DATE" truncate="20" /><br/></Text>
84					<Text style="mini"><GedcomValue tag="BIRT:PLAC" /></Text>
85				</TextBox>
86				<TextBox height="$height1" width="$width4">
87					<Text style="text"><GedcomValue tag="DEAT:DATE" truncate="20" /><br/></Text>
88					<Text style="mini"><GedcomValue tag="DEAT:PLAC" /></Text>
89				</TextBox>
90				<!-- If FAMC is empty all lines will be ignored. So, don't place any newline break in here -->
91				<Gedcom id="@FAMC">
92					<TextBox height="$height1" width="$width5">
93						<Gedcom id="@HUSB">
94							<Text style="text"><GetPersonName id="" /></Text>
95						</Gedcom>
96					</TextBox>
97					<TextBox height="$height1" newline="1">
98						<Gedcom id="@WIFE">
99							<Text style="text"><GetPersonName id="" /></Text>
100						</Gedcom>
101					</TextBox>
102				</Gedcom>
103				<!-- one way or the other, we need a new line -->
104				<if condition="@FAMC==''">
105					<TextBox height="2" newline="1"/>
106				</if>
107				<RepeatTag tag="FAMS">
108					<Gedcom id="@FAMS">
109						<TextBox height="$height2" left="$width1" width="$widthB2">
110							<if condition="$sex=='M'">
111								<Text style="minibold"><var var="I18N::translate('Wife')" />: </Text>
112								<Text style="mini"><GetPersonName id="@WIFE" /> <GedcomValue tag="MARR:DATE" />
113								</Text>
114							</if>
115							<if condition="$sex=='F'">
116								<Text style="minibold"><var var="I18N::translate('Husband')" />: </Text>
117								<Text style="mini"><GetPersonName id="@HUSB" /> <GedcomValue tag="MARR:DATE" />
118								</Text>
119							</if>
120						</TextBox>
121						<TextBox height="$height2" width="50">
122							<Text style="minibold"><var var="I18N::translate('Children')" />:</Text>
123						</TextBox>
124						<TextBox height="$height2" newline="1">
125							<SetVar name="morechildren" value="0" />
126							<RepeatTag tag="CHIL">
127								<Gedcom id="@CHIL">
128									<Text style="mini">
129										<!-- Print this only when more than one child exist -->
130										<if condition="$morechildren==1">, </if>
131										<GetPersonName id="" />
132									</Text>
133									<SetVar name="morechildren" value="1" />
134								</Gedcom>
135							</RepeatTag>
136						</TextBox>
137					</Gedcom>
138				</RepeatTag>
139
140				<!-- keep distance between line -->
141				<TextBox height="2" newline="1" padding="0"/>
142				<Line />
143				<TextBox height="2" newline="1" padding="0"/>
144
145			</Relatives>
146			<Cell align="rightrtl" height="15" newline="1" style="label">
147				<br /><var var="I18N::translate('Total individuals')" />: <ListTotal />
148			</Cell>
149		</Body>
150
151		<Footer>
152			<Cell align="rightrtl" newline="1" style="date"><Now /></Cell>
153		</Footer>
154	</Doc>
155</Report>
156