<?xml version="1.0" encoding="UTF-8"?>
<PGVReport access="PRIV_USER" icon="place">
	<!-- $Id$ -->
	<PGVRTitle><PGVRvar var="pgv_lang[changes_report]" /></PGVRTitle>
	<PGVRDescription>Prints a list of individuals matching specific change criteria</PGVRDescription>
	<PGVRInput name="changeRangeStart" lookup="DATE" type="text" default="NOW-30"><PGVRvar var="pgv_lang[changedate2]" /></PGVRInput>
	<PGVRInput name="changeRangeEnd" lookup="DATE" type="text" default="NOW"><PGVRvar var="pgv_lang[changedate1]" /></PGVRInput>
	<PGVRInput name="sortby" type="select" options="CHAN,NAME,BIRT:DATE"><PGVRvar var="pgv_lang[sort_by]" /></PGVRInput>
	<PGVRInput name="pending" type="select" options="yes,no"><PGVRvar var="pgv_lang[show_pending]" /></PGVRInput>
	<PGVRInput name="pageSize" type="select" default="A4" options="letter,A3,A4,legal"><PGVRvar var="pgv_lang[page_size]" /></PGVRInput>
	<PGVRInput name="pageorient" type="select" default="landscape" options="landscape,portrait"><PGVRvar var="pgv_lang[orientation]" /></PGVRInput>
	<PGVRInput name="fonts" type="select" default="dejavusans" options="arialunicid0,dejavusans,helvetica"><PGVRvar var="pgv_lang[font]"/></PGVRInput>

	<!-- Header -->
	<PGVRStyle name="header" font="$fonts" size="16" style="b" />
	<!-- Page numbers text -->
	<PGVRStyle name="pagenum" font="$fonts" size="8"/>
	<!-- Standard text -->
	<PGVRStyle name="text" font="$fonts" size="9"/>
	<!-- Column labels -->
	<PGVRStyle name="label" font="$fonts" size="10" style="b"/>
	<!-- Generated by style - required style name by the generator -->
	<PGVRStyle name="genby" font="$fonts" size="8" />
	<!-- Date text -->
	<PGVRStyle name="date" font="$fonts" size="8"/>
	<PGVRStyle name="header2" font="$fonts" size="12" style="b" />

	<PGVRif condition="$pageorient=='landscape'">
		<!-- landscape orientation -->
		<PGVRSetVar name="idwidth" value="50"/>
		<PGVRSetVar name="namewidth" value="220"/>
		<PGVRSetVar name="datewidth" value="300"/>
	</PGVRif>
	
	<PGVRif condition="$pageorient=='portrait'">
		<!-- portrait orientation -->
		<PGVRSetVar name="idwidth" value="40"/>
		<PGVRSetVar name="namewidth" value="170"/>
		<PGVRSetVar name="datewidth" value="190"/>
	</PGVRif>

	<PGVRDoc pageSize="$pageSize" orientation="$pageorient" >
		<PGVRHeader>
			<PGVRCell align="center" height="20" newline="1" style="header"><PGVRvar var="pgv_lang[changes_report]" /></PGVRCell>
			<PGVRCell align="rightrtl" newline="1" style="pagenum"><PGVRvar var="pgv_lang[page]" /> <PGVRPageNum /> <PGVRvar var="pgv_lang[of]" /> <PGVRTotalPages /></PGVRCell>
		</PGVRHeader>

		<PGVRBody>

			<!-- Pending changes section Header -->
			<PGVRif condition="$pending=='yes'">
				<PGVRCell align="center" height="20" newline="1" style="header2"><PGVRvar var="pgv_lang[review_changes_block]" /></PGVRCell>
				<PGVRTextBox border="1" height="12" width="$idwidth">
					<PGVRText style="label"> </PGVRText>
				</PGVRTextBox>

				<PGVRSetVar name="fill" value="" />
				<PGVRif condition="$sortby=='NAME'"><PGVRSetVar name="fill" value="#AAAAAA" /></PGVRif>
				<PGVRTextBox bgcolor="$fill" border="1" height="12" width="$namewidth">
					<PGVRText style="label"><PGVRvar var="pgv_lang[name]" /></PGVRText>
				</PGVRTextBox>

				<PGVRTextBox border="1" height="12" width="$datewidth">
					<PGVRText style="label"><PGVRvar var="pgv_lang[differences]" /></PGVRText>
				</PGVRTextBox>

				<PGVRSetVar name="fill" value="" />
				<PGVRif condition="$sortby=='CHAN'"><PGVRSetVar name="fill" value="#AAAAAA" /></PGVRif>
				<PGVRTextBox bgcolor="$fill" border="1" height="12" newline="1">
					<PGVRText style="label"><PGVRvar var="factarray[CHAN]" /></PGVRText>
				</PGVRTextBox>

				<!-- Pending Changes Section Data -->
				<PGVRList list="pending" sortby="$sortby">
					<PGVRTextBox height="12" width="$idwidth">
						<PGVRText style="text"><PGVRGedcomValue tag="@id" /></PGVRText>
					</PGVRTextBox>
					<PGVRTextBox height="12" width="$namewidth">
						<PGVRText style="text"><PGVRGetPersonName id="" /></PGVRText>
					</PGVRTextBox>
					<PGVRTextBox height="12" width="$datewidth">
						<PGVRFacts ignore="CHAN" families="0" diff="true">
							<PGVRText style="text">
								<PGVRvar var="factarray[@fact]" /> <PGVRGedcomValue tag="@fact:DATE" /><br />
							</PGVRText>
						</PGVRFacts>
					</PGVRTextBox>
					<PGVRTextBox height="12" newline="1">
						<PGVRText style="text"><PGVRGedcomValue tag="CHAN:DATE" /> <PGVRGedcomValue tag="CHAN:DATE:TIME" /> - <PGVRGedcomValue tag="CHAN:_PGVU" /></PGVRText>
					</PGVRTextBox>

				</PGVRList>
				<PGVRCell align="rightrtl" height="25" newline="1" style="label">
					<PGVRvar var="pgv_lang[changes_pending_tot]" /><PGVRListTotal /><br />
				</PGVRCell>
			</PGVRif>

			<!-- Recent Changes Section Header -->
			<PGVRCell align="center" height="20" newline="1" style="header2"><PGVRvar var="pgv_lang[recent_changes]" /> <PGVRvar var="changeRangeStart" date="1" /> - <PGVRvar var="changeRangeEnd" date="1" /></PGVRCell>
			<PGVRTextBox border="1" height="12" width="$idwidth">
				<PGVRText style="label"> </PGVRText>
			</PGVRTextBox>

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='NAME'"><PGVRSetVar name="fill" value="#AAAAAA" /></PGVRif>
			<PGVRTextBox bgcolor="$fill" border="1" height="12" width="$namewidth">
				<PGVRText style="label"><PGVRvar var="pgv_lang[name]" /></PGVRText>
			</PGVRTextBox>

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='BIRT:DATE'"><PGVRSetVar name="fill" value="#AAAAAA" /></PGVRif>
			<PGVRTextBox bgcolor="$fill" border="1" height="12" width="$datewidth">
				<PGVRText style="label"><PGVRvar var="factarray[BIRT]" /> - <PGVRvar var="factarray[DEAT]" /></PGVRText>
			</PGVRTextBox>

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='CHAN'"><PGVRSetVar name="fill" value="#AAAAAA" /></PGVRif>
			<PGVRTextBox bgcolor="$fill" border="1" height="12" newline="1">
				<PGVRText style="label"><PGVRvar var="factarray[CHAN]" /></PGVRText>
			</PGVRTextBox>

			<!-- Recent Changes Section Data -->
			<PGVRList list="individual" filter1="CHAN:DATE LTE $changeRangeEnd" filter2="CHAN:DATE GTE $changeRangeStart" sortby="$sortby">
				<PGVRTextBox height="12" width="$idwidth">
					<PGVRText style="text"><PGVRGedcomValue tag="@id" /></PGVRText>
				</PGVRTextBox>

				<PGVRTextBox height="12" width="$namewidth">
					<PGVRText style="text"><PGVRGetPersonName id="" /></PGVRText>
				</PGVRTextBox>

				<PGVRTextBox height="12" width="$datewidth">
					<PGVRText style="text"><PGVRvarLetter var="factarray[BIRT]" />: <PGVRGedcomValue tag="BIRT:DATE" /><br /><PGVRvarLetter var="factarray[DEAT]" />: <PGVRGedcomValue tag="DEAT:DATE" /></PGVRText>
				</PGVRTextBox>

				<PGVRTextBox height="12" newline="1">
					<PGVRText style="text"><PGVRGedcomValue tag="CHAN:DATE" /> <PGVRGedcomValue tag="CHAN:DATE:TIME" /> - <PGVRGedcomValue tag="CHAN:_PGVU" /></PGVRText>
				</PGVRTextBox>
			</PGVRList>

			<PGVRCell align="rightrtl" height="25" newline="1" style="label">
				<PGVRvar var="pgv_lang[changes_accepted_tot]" /><PGVRListTotal />
			</PGVRCell>
		</PGVRBody>
		<PGVRFooter>
			<PGVRCell align="rightrtl" newline="1" style="date"><PGVRNow /></PGVRCell>
		</PGVRFooter>
	</PGVRDoc>
</PGVReport>
