xref: /webtrees/resources/xml/reports/occupation_report.xml (revision 4a52049613a3fd380896a97f74b94d45ccccc97c)
1<?xml version="1.0" encoding="UTF-8" ?>
2<Report>
3	<Title><var var="I18N::translate('Occupations')" /></Title>
4	<Description><var var="I18N::translate('A report of individuals who had a given occupation.')" /></Description>
5	<Input name="occupation" lookup="OCCU" type="text"><var var="I18N::translate('Occupation')" /> </Input>
6	<Input name="sortby" type="select" default="NAME" options="NAME=>I18N::translate('sort by name')|BIRT:DATE=>I18N::translate('sort by date of birth')"><var var="I18N::translate('Sort order')" /></Input>
7	<Input name="pageSize" type="select" default="A4" options="letter=>I18N::translateContext('paper size','Letter')|A3=>I18N::translateContext('paper size', 'A3')|A4=>I18N::translateContext('paper size','A4')|legal=>I18N::translateContext('paper size','Legal')"><var var="I18N::translate('Page size')" /></Input>
8	<!--
9	<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>
10	-->
11	<SetVar name="fonts" value="dejavusans" />
12
13	<!-- Header -->
14	<Style name="header" font="$fonts" size="16" style="b" />
15	<!-- Page numbers text -->
16	<Style name="pagenum" font="$fonts" size="8"/>
17	<!-- Standard text -->
18	<Style name="text" font="$fonts" size="8"/>
19	<!-- Column labels -->
20	<Style name="label" font="$fonts" size="10" style="b" />
21	<!-- Generated by style - required style name by the generator -->
22	<Style name="genby" font="$fonts" size="8" />
23	<!-- Date text -->
24	<Style name="date" font="$fonts" size="8"/>
25
26	<!-- landscape orientation -->
27	<SetVar name="namewidth" value="180"/>
28	<SetVar name="datewidth" value="95"/>
29	<SetVar name="occuwidth" value="130"/>
30	<SetVar name="occudatewidth" value="95"/>
31	<SetVar name="placewidth" value="100"/>
32	<SetVar name="printedoccupation" value="0" />
33	<SetVar name="morespaceindi" value="$namewidth + $datewidth" />
34
35	<Doc pageSize="$pageSize" orientation="landscape">
36		<Header>
37			<Cell align="center" height="20" newline="1" style="header"><var var="I18N::translate('Occupations')" /></Cell>
38			<Cell align="rightrtl" newline="1" style="pagenum"><var var="I18N::translate('Page')" /> <PageNum /> <var var="I18N::translate('of')" /> <TotalPages /></Cell>
39
40			<SetVar name="fill" value="" />
41			<if condition="$sortby=='NAME'"><SetVar name="fill" value="#AAAAAA" /></if>
42			<TextBox bgcolor="$fill" border="1" width="$namewidth">
43				<Text style="label"><var var="I18N::translate('Name')" /></Text>
44			</TextBox>
45
46			<SetVar name="fill" value="" />
47			<if condition="$sortby=='BIRT:DATE'"><SetVar name="fill" value="#AAAAAA" /></if>
48			<TextBox bgcolor="$fill" border="1" width="$datewidth">
49				<Text style="label"><var var="I18N::translate('Date of birth')" /></Text>
50			</TextBox>
51			<!-- should print and sort by birth date -->
52
53			<TextBox border="1" width="$occuwidth">
54				<Text style="label"><var var="I18N::translate('Occupation')" /></Text>
55			</TextBox>
56			<TextBox border="1" width="$occudatewidth">
57				<Text style="label"><var var="I18N::translate('Date')" /></Text>
58			</TextBox>
59			<TextBox border="1" width="$placewidth">
60				<Text style="label"><var var="I18N::translate('Place')" /></Text>
61			</TextBox>
62
63			<TextBox border="1" newline="1">
64				<Text style="label"><var var="I18N::translate('Note')" /></Text>
65			</TextBox>
66		</Header>
67		<Body>
68			<List list="individual" filter1="OCCU CONTAINS $occupation" sortby="$sortby">
69				<SetVar name="moreoccupation" value="0" />
70				<!-- Printed List counter -->
71				<SetVar name="printedoccupation" value="$printedoccupation + 1" />
72				<Cell style="text" width="$namewidth"><GetPersonName id="" />
73				</Cell>
74				<Cell style="text" width="$datewidth"><GedcomValue tag="BIRT:DATE" newline="1" /></Cell>
75				<RepeatTag tag="OCCU">
76					<!-- Intend the fact line if more then one occupation -->
77					<if condition="$moreoccupation==1">
78						<Cell style="text" width="$morespaceindi"> </Cell>
79					</if>
80					<Cell style="text" width="$occuwidth"><GedcomValue tag="OCCU"/></Cell>
81					<!-- Date of the fact -->
82					<Cell style="text" width="$occudatewidth"><GedcomValue tag="OCCU:DATE"/></Cell>
83					<!-- Place of the fact -->
84					<Cell style="text" width="$placewidth"><GedcomValue tag="OCCU:PLAC"/></Cell>
85					<!-- Note text -->
86					<Cell style="text" newline="1">
87						<RepeatTag tag="OCCU">
88							<GedcomValue tag="OCCU:NOTE"/>
89						</RepeatTag>
90					</Cell>
91					<SetVar name="moreoccupation" value="1" />
92				</RepeatTag>
93			</List>
94			<Cell align="rightrtl" newline="1" style="label"><br /><var var="I18N::translate('Total individuals')" />: <ListTotal /></Cell>
95		</Body>
96		<Footer>
97			<Cell align="rightrtl" newline="1" style="date"><Now /></Cell>
98		</Footer>
99	</Doc>
100</Report>
101