summaryrefslogtreecommitdiff
path: root/modules/source_report/report.xml
blob: 28bfabbff62ed3e84342f433501a7f7d37693c8c (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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<?xml version="1.0" encoding="UTF-8"?>
<PGVReport>
	<PGVRTitle><PGVRvar var="i18n::translate('Fact Sources')" /></PGVRTitle>
	<PGVRDescription>Prints a list of individuals and families with a specific source for facts</PGVRDescription>

	<PGVRInput name="sid" lookup="SOUR" default="" type="text"><PGVRvar var="i18n::translate('Find Source ID')" /></PGVRInput>
	<PGVRInput name="sortby" type="select" default="BIRT:DATE" options="NAME=>i18n::translate('Name')|BIRT:DATE=>i18n::translate('Date of birth')"><PGVRvar var="i18n::translate('Sort by')" /></PGVRInput>
	<PGVRInput name="pageSize" type="select" default="A4" options="letter=>i18n::translate_c('paper size','Letter')|A3=>i18n::translate_c('paper size', 'A3')|A4=>i18n::translate_c('paper size','A4')|legal=>i18n::translate_c('paper size','Legal')"><PGVRvar var="i18n::translate('Page size')" /></PGVRInput>
	<PGVRInput name="fonts" type="select" default="dejavusans" options="arialunicid0=>i18n::translate_c('font name', 'Arial')|dejavusans=>i18n::translate_c('font name', 'DejaVu')|helvetica=>i18n::translate_c('font name', 'Helvetica')"><PGVRvar var="i18n::translate('Font')"/></PGVRInput>

	<!-- Header -->
	<PGVRStyle name="header" font="$fonts" size="18" style="b" />
	<!-- Source Title -->
	<PGVRStyle name="header2" font="$fonts" size="14" style="b" />
	<!-- Name of the List Type. INDI or FAM -->
	<PGVRStyle name="listtype" font="$fonts" size="12" style="b" />
	<!-- Page numbers text -->
	<PGVRStyle name="pagenum" font="$fonts" size="8" />
	<!-- Generated by style - required style name by the generator -->
	<PGVRStyle name="genby" font="$fonts" size="8" />
	<!-- Date Text - CSS Style name -->
	<PGVRStyle name="date" font="$fonts" size="8"/>
	<!-- Column list labels - CSS Style name -->
	<PGVRStyle name="list_label" font="$fonts" size="9" style="b"/>
	<!-- List values - CSS Style name -->
	<PGVRStyle name="list_value" font="$fonts" size="8"/>

	<PGVRSetVar name="nameindi" value="200" />
	<PGVRSetVar name="namefam" value="270" />
	<PGVRSetVar name="datebirth" value="120" />
	<PGVRSetVar name="fact" value="100" />
	<PGVRSetVar name="dateevent" value="110" />
	<PGVRSetVar name="vspace" value="5" />
	<PGVRSetVar name="printedsource" value="0" />
	<PGVRSetVar name="moresourcespaceindi" value="$nameindi + $datebirth" />
	<PGVRSetVar name="ignore" value="CHAN,CHIL,FAMC,FAMS,HUSB,NAME,NOTE,OBJE,SEX,SOUR,TITL,WIFE,_UID,_WT_OBJE_SORT"/>

	<PGVRDoc pageSize="$pageSize" orientation="landscape">
		<PGVRHeader>
			<PGVRCell align="center" newline="1" style="header"><PGVRvar var="i18n::translate('Sources')" /></PGVRCell>
			<PGVRCell align="rightrtl" newline="1" style="pagenum"><PGVRvar var="i18n::translate('Page')" /> <PGVRPageNum /> <PGVRvar var="i18n::translate('of')" /> <PGVRTotalPages /></PGVRCell>
			<!-- Source Title -->
			<PGVRGedcom id="$sid">
				<PGVRCell align="center" newline="1" style="header2"><PGVRGedcomValue tag="TITL" /> (<PGVRvar var="sid"/>)</PGVRCell>
			</PGVRGedcom>
		</PGVRHeader>

		<PGVRBody>
			<!-- List type -->
			<PGVRCell align="center" newline="1" style="listtype"><PGVRvar var="i18n::translate('Individuals')" /></PGVRCell>
			<PGVRTextBox height="$vspace" newline="1" padding="0"/>

			<!-- Individual Name -->
			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='NAME'">
				<PGVRSetVar name="fill" value="#AAAAAA" />
			</PGVRif>
			<PGVRCell bgcolor="$fill" border="1" style="list_label" width="$nameindi"><PGVRvar var="i18n::translate('Name')" /></PGVRCell>
			<!-- Birth date -->
			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='BIRT:DATE'">
				<PGVRSetVar name="fill" value="#AAAAAA" />
			</PGVRif>
			<PGVRCell bgcolor="$fill" border="1" style="list_label" width="$datebirth"><PGVRvar var="i18n::translate('Birth Date')" /></PGVRCell>
			<!-- Name of the fact that contains the source -->
			<PGVRCell border="1" style="list_label" width="$fact"><PGVRvar var="i18n::translate('Event')" /></PGVRCell>
			<!-- Date of the fact -->
			<PGVRCell border="1" style="list_label" width="$dateevent"><PGVRvar var="i18n::translate('Date')" /></PGVRCell>
			<!-- Detailed source text -->
			<PGVRCell border="1" newline="1" style="list_label"><PGVRvar var="i18n::translate('Source')" /></PGVRCell>
			<PGVRTextBox height="$vspace" newline="1" padding="0"/>

			<!-- Individual List -->
			<PGVRList list="individual" filter1=":SOUR CONTAINS @$sid@" sortby="$sortby">
				<PGVRSetVar name="moresource" value="0" />
				<PGVRSetVar name="printsource" value="0" />
				<!-- Printed List counter -->
				<PGVRSetVar name="printedsource" value="$printedsource + 1" />

				<!-- Individual Name -->
				<PGVRCell style="list_value" width="$nameindi"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
				<!-- Birth date -->
				<PGVRCell style="list_value" width="$datebirth"><PGVRGedcomValue tag="BIRT:DATE" /></PGVRCell>
				<PGVRFacts ignore="$ignore">
					<PGVRSetVar name="printfact" value="0" />
					<PGVRRepeatTag tag="@fact:SOUR">
						<PGVRGedcom id="@SOUR">
							<PGVRif condition="@ID==$sid">
								<PGVRSetVar name="printfact" value="1" />
							</PGVRif>
						</PGVRGedcom>
					</PGVRRepeatTag>

					<PGVRif condition="$printfact==1">
						<PGVRSetVar name="printsource" value="0" />
						<!-- Intend the fact line if more then one fact has source -->
						<PGVRif condition="$moresource==1">
							<PGVRCell style="list_value" width="$moresourcespaceindi"> </PGVRCell>
						</PGVRif>

						<!-- Name of the fact that contains the source -->
						<PGVRCell style="list_value" width="$fact"><PGVRvar var="i18n::translate('@fact')"/></PGVRCell>
						<!-- Date of the fact -->
						<PGVRCell style="list_value" width="$dateevent"><PGVRGedcomValue tag="@fact:DATE"/></PGVRCell>
						<!-- Detailed source text -->
						<PGVRCell style="list_value" newline="1">
							<PGVRRepeatTag tag="@fact:SOUR">
								<PGVRGedcom id="@SOUR">
									<PGVRif condition="@ID==$sid">
										<PGVRSetVar name="printsource" value="1" />
									</PGVRif>
								</PGVRGedcom>
								<PGVRif condition="$printsource==1">
									<PGVRGedcomValue tag="SOUR:PAGE"/>
									<PGVRif condition="@SOUR:DATA:TEXT!=''">
										<br /><PGVRGedcomValue tag="SOUR:DATA:TEXT"/>
									</PGVRif>
									<PGVRSetVar name="printsource" value="0" />
								</PGVRif>
							</PGVRRepeatTag>
						</PGVRCell>
						<PGVRSetVar name="moresource" value="1" />
					</PGVRif>
					<PGVRSetVar name="printfact" value="0" />
				</PGVRFacts>
			</PGVRList>

			<!-- Print the list counter -->
			<PGVRif condition="$printedsource==0">
				<PGVRCell align="rightrtl" newline="1" style="list_label"><PGVRvar var="i18n::translate('Total individuals')"/>: 0</PGVRCell>
			</PGVRif>
			<PGVRif condition="$printedsource > 0">
				<PGVRTextBox height="$vspace" newline="1" padding="0"/>
				<PGVRCell align="rightrtl" newline="1" style="list_label"><PGVRvar var="i18n::translate('Total individuals')"/>: <PGVRvar var="printedsource" /></PGVRCell>
			</PGVRif>

			<!-- Family List -->
			<PGVRTextBox height="$vspace" newline="1" padding="0"/>
			<PGVRCell align="center" newline="1" style="listtype"><PGVRvar var="i18n::translate('Families')" /></PGVRCell>
			<PGVRTextBox height="$vspace" newline="1" padding="0"/>
			<!-- Family Name -->
			<PGVRCell border="1" style="list_label" width="$namefam"><PGVRvar var="i18n::translate('Name')" /></PGVRCell>
			<!-- Name of the fact that contains the source -->
			<PGVRCell border="1" style="list_label" width="$fact"><PGVRvar var="i18n::translate('Event')" /></PGVRCell>
			<!-- Date of the fact -->
			<PGVRCell bgcolor="#AAAAAA" border="1" style="list_label" width="$dateevent"><PGVRvar var="i18n::translate('Date')" /></PGVRCell>
			<!-- Detailed source text -->
			<PGVRCell border="1" newline="1" style="list_label"><PGVRvar var="i18n::translate('Source')" /></PGVRCell>

			<!-- Family List -->
			<PGVRTextBox height="$vspace" newline="1" padding="0"/>
			<PGVRSetVar name="printedsource" value="0" />
			<PGVRList list="family" filter1=":SOUR CONTAINS @$sid@" sortby="MARR:DATE">
				<PGVRSetVar name="moresource" value="0" />
				<PGVRSetVar name="printsource" value="0" />
				<!-- Printed List counter -->
				<PGVRSetVar name="printedsource" value="$printedsource + 1" />

				<!-- Family Name -->
				<PGVRCell style="list_value" width="$namefam"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
				<PGVRFacts ignore="$ignore">
					<PGVRSetVar name="printfact" value="0" />
					<PGVRRepeatTag tag="@fact:SOUR">
						<PGVRGedcom id="@SOUR">
							<PGVRif condition="@ID==$sid">
								<PGVRSetVar name="printfact" value="1" />
							</PGVRif>
						</PGVRGedcom>
					</PGVRRepeatTag>

					<PGVRif condition="$printfact==1">
						<PGVRSetVar name="printsource" value="0" />
						<!-- Intend the fact line if more then one fact has source -->
						<PGVRif condition="$moresource==1">
							<PGVRCell style="list_value" width="$namefam"> </PGVRCell>
						</PGVRif>

						<!-- Name of the fact that contains the source -->
						<PGVRCell style="list_value" width="$fact">
							<PGVRif condition="@fact=='MARR'">
								<!-- Print different type of marriages -->
								<PGVRif condition="@MARR:TYPE==''">
									<PGVRvar var="i18n::translate('@fact')"/>
								</PGVRif>
								<PGVRif condition="@MARR:TYPE=='Religious'">
									<PGVRvar var="i18n::translate('Religious Marriage')" />
								</PGVRif>
								<PGVRif condition="@MARR:TYPE=='Civil'">
									<PGVRvar var="i18n::translate('Civil Marriage')" />
								</PGVRif>
								<PGVRif condition="@MARR:TYPE=='Partners'">
									<PGVRvar var="i18n::translate('Registered Partnership')" />
								</PGVRif>
							</PGVRif>
							<PGVRif condition="@fact!='MARR'">
								<PGVRvar var="i18n::translate('@fact')"/>
							</PGVRif>
						</PGVRCell>

						<!-- Date of the fact -->
						<PGVRCell style="list_value" width="$dateevent"><PGVRGedcomValue tag="@fact:DATE"/></PGVRCell>
						<!-- Detailed source text -->
						<PGVRCell style="list_value" newline="1">
							<PGVRRepeatTag tag="@fact:SOUR">
								<PGVRGedcom id="@SOUR">
									<PGVRif condition="@ID==$sid">
										<PGVRSetVar name="printsource" value="1" />
									</PGVRif>
								</PGVRGedcom>
								<PGVRif condition="$printsource==1">
									<PGVRGedcomValue tag="SOUR:PAGE"/>
									<PGVRif condition="@SOUR:DATA:TEXT!=''">
										<br /><PGVRGedcomValue tag="SOUR:DATA:TEXT"/>
									</PGVRif>
									<PGVRSetVar name="printsource" value="0" />
								</PGVRif>
							</PGVRRepeatTag>
						</PGVRCell>
						<PGVRSetVar name="moresource" value="1" />
					</PGVRif>
					<PGVRSetVar name="printfact" value="0" />
				</PGVRFacts>
			</PGVRList>

			<!-- Print the list counter -->
			<PGVRif condition="$printedsource==0">
				<PGVRCell align="rightrtl" newline="1" style="list_label"><PGVRvar var="i18n::translate('Total families')"/>: 0</PGVRCell>
			</PGVRif>
			<PGVRif condition="$printedsource > 0">
				<PGVRTextBox height="$vspace" newline="1" padding="0"/>
				<PGVRCell align="rightrtl" newline="1" style="list_label"><PGVRvar var="i18n::translate('Total families')"/>: <PGVRvar var="printedsource" /></PGVRCell>
			</PGVRif>
			<PGVRTextBox height="$vspace" newline="1" padding="0"/>
		</PGVRBody>

		<PGVRFooter>
			<PGVRCell align="rightrtl" newline="1" style="date"><PGVRNow/></PGVRCell>
		</PGVRFooter>

	</PGVRDoc>
</PGVReport>