summaryrefslogtreecommitdiff
path: root/modules_v2/marriage_report/report.xml
blob: 15d34dca35074b70ae2c88499519e9673a1baf50 (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
<?xml version="1.0" encoding="UTF-8"?>
<Report>
	<!-- $Id$ -->
	<Title><var var="WT_I18N::translate('Marriage Date and Place Report')" /></Title>
	<Description><var var="WT_I18N::translate('A report of people who were married in a given time or place.')" /></Description>
	<Input name="name" lookup="NAME" type="text"><var var="WT_I18N::translate('Name')" /></Input>
	<Input name="marrplace" lookup="PLAC" type="text"><var var="WT_I18N::translate('Marriage Place contains')" /> </Input>
	<Input name="marrdate1" lookup="DATE" type="text"><var var="WT_I18N::translate('Marriage Date range start')" /></Input>
	<Input name="marrdate2" lookup="DATE" type="text"><var var="WT_I18N::translate('Marriage Date range end')" /></Input>
	<Input name="sortby" type="select" options="NAME=>WT_I18N::translate('Name')|MARR:DATE=>WT_Gedcom_Tag::getLabel('MARR:DATE')"><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="16" 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 tetx -->
	<Style name="date" font="$fonts" size="8"/>
	<Style name="text" font="$fonts" size="9" />
	<Style name="spouse" font="$fonts" size="8" />
	<Style name="label" font="$fonts" size="10" style="b"/>

	<Doc pageSize="$pageSize" orientation="landscape">
		<Header>
			<Cell align="center" height="20" newline="1" style="header"><var var="WT_I18N::translate('Marriage Date and Place Report')" /></Cell>
			<Cell align="rightrtl" height="10" newline="1" style="pagenum"><var var="WT_I18N::translate('Page')" /> <PageNum /> <var var="WT_I18N::translate('of')" /> <TotalPages /></Cell>

			<SetVar name="fill" value="" />
			<if condition="$sortby=='NAME'">
				<SetVar name="fill" value="#AAAAAA" />
			</if>
			<TextBox bgcolor="$fill" border="1" height="12" width="200">
				<Text style="label"><var var="WT_I18N::translate('Name')" /></Text>
			</TextBox>

			<SetVar name="fill" value="" />
			<if condition="$sortby=='MARR:DATE'">
				<SetVar name="fill" value="#AAAAAA" />
			</if>
			<TextBox bgcolor="$fill" border="1" height="12" width="100">
				<Text style="label"><var var="WT_I18N::translate('Date')" /></Text>
			</TextBox>

			<TextBox border="1" height="12" width="150">
				<Text style="label"><var var="WT_I18N::translate('Place')" /></Text>
			</TextBox>

			<TextBox border="1" height="12" newline="1">
				<Text style="label"><var var="WT_I18N::translate('Source')" /></Text>
			</TextBox>
		</Header>

		<Body>
			<SetVar name="printedFamilies" value="0" />
			<List list="family" filter1="MARR:PLAC CONTAINS $marrplace" filter2="MARR:DATE GTE $marrdate1" filter3="MARR:DATE LTE $marrdate2" sortby="$sortby">
			<!-- filter4 should be: filter4="NAME CONTAINS $name", but the family name doesn't exist as a field in the database,
					so we can't use that.  -->
				<SetVar name="skipFamily" value="no" />
				<if condition="$name!=''">
					<SetVar name="skipFamily" value="yes" />
					<Gedcom id="@HUSB">
						<if condition="stristr(@NAME,$name)!==false">
							<SetVar name="skipFamily" value="no" />
						</if>
					</Gedcom>
					<Gedcom id="@WIFE">
						<if condition="stristr(@NAME,$name)!==false">
							<SetVar name="skipFamily" value="no" />
						</if>
					</Gedcom>
				</if>
				<if condition="$skipFamily=='no'">
					<SetVar name="printedFamilies" value="$printedFamilies+1" />

					<TextBox height="12" width="200">
						<Text style="text"><GetPersonName id="@HUSB" /></Text>
						<Text style="spouse">
							<br />   <GetPersonName id="@WIFE" />
						</Text>
					</TextBox>

					<TextBox height="12" width="100">
						<Text style="text"><GedcomValue tag="MARR:DATE" newline="1" /></Text>
					</TextBox>

					<TextBox height="12" width="150">
						<Text style="text"><GedcomValue tag="MARR:PLAC" /></Text>
					</TextBox>

					<TextBox height="12" newline="1">
						<!-- Only with multiple sources use line feed (br) -->
						<SetVar name="usebr" value="0"/>
						<Text style="text">
							<RepeatTag tag="MARR:SOUR">
								<Gedcom id="@SOUR">
									<if condition="$usebr==1"><br /></if>
									<if condition="@AUTH!=''"><GedcomValue tag="AUTH" />, </if>
									«<GedcomValue tag="TITL" />»
									<if condition="@PUBL!=''"> (<GedcomValue tag="PUBL" />)</if>
								</Gedcom>
								<if condition="@PAGE!=''">: <GedcomValue tag="SOUR:PAGE" /></if>
								<GedcomValue tag="SOUR:DATA:TEXT" />
								<SetVar name="usebr" value="1"/>
							</RepeatTag>
						</Text>
					</TextBox>

				</if>
			</List>
			<Cell align="rightrtl" height="24" newline="1" style="label"><br/><var var="WT_I18N::translate('Total families')"/>: <var var="printedFamilies" /></Cell>
		</Body>
		<Footer>
			<Cell align="rightrtl" newline="1" style="date"><Now/></Cell>
		</Footer>
	</Doc>
</Report>