<?xml version="1.0" encoding="UTF-8"?>
<PGVReport>
	<!-- $Id$ -->
	<PGVRTitle><PGVRvar var="i18n::translate('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="i18n::translate('Starting range of change dates')" /></PGVRInput>
	<PGVRInput name="changeRangeEnd" lookup="DATE" type="text" default="NOW"><PGVRvar var="i18n::translate('Ending range of change dates')" /></PGVRInput>
	<PGVRInput name="sortby" type="select" options="CHAN,NAME,BIRT:DATE"><PGVRvar var="i18n::translate('Sort by')" /></PGVRInput>
	<PGVRInput name="pending" type="select" options="yes,no"><PGVRvar var="i18n::translate('Show pending changes')" /></PGVRInput>
	<PGVRInput name="pageSize" type="select" default="A4" options="letter,A3,A4,legal"><PGVRvar var="i18n::translate('Page size')" /></PGVRInput>
	<PGVRInput name="pageorient" type="select" default="landscape" options="landscape,portrait"><PGVRvar var="i18n::translate('Orientation')" /></PGVRInput>
	<PGVRInput name="fonts" type="select" default="dejavusans" options="arialunicid0,dejavusans,helvetica"><PGVRvar var="i18n::translate('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="i18n::translate('Changes Report')" /></PGVRCell>
			<PGVRCell align="rightrtl" newline="1" style="pagenum"><PGVRvar var="i18n::translate('Page')" /> <PGVRPageNum /> <PGVRvar var="i18n::translate('of')" /> <PGVRTotalPages /></PGVRCell>
		</PGVRHeader>

		<PGVRBody>

			<!-- Pending changes section Header -->
			<PGVRif condition="$pending=='yes'">
				<PGVRCell align="center" height="20" newline="1" style="header2"><PGVRvar var="i18n::translate('Pending Changes')" /></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="i18n::translate('Name')" /></PGVRText>
				</PGVRTextBox>

				<PGVRTextBox border="1" height="12" width="$datewidth">
					<PGVRText style="label"><PGVRvar var="i18n::translate('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="i18n::translate('Last Change')" /></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="i18n::translate('@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:_WT_USER" /></PGVRText>
					</PGVRTextBox>

				</PGVRList>
				<PGVRCell align="rightrtl" height="25" newline="1" style="label">
					<PGVRvar var="i18n::translate('Total pending changes: ')" /><PGVRListTotal /><br />
				</PGVRCell>
			</PGVRif>

			<!-- Recent Changes Section Header -->
			<PGVRCell align="center" height="20" newline="1" style="header2"><PGVRvar var="i18n::translate('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="i18n::translate('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="i18n::translate('Birth')" /> - <PGVRvar var="i18n::translate('Death')" /></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="i18n::translate('Last Change')" /></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="i18n::translate('Birth')" />: <PGVRGedcomValue tag="BIRT:DATE" /><br /><PGVRvarLetter var="i18n::translate('Death')" />: <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:_WT_USER" /></PGVRText>
				</PGVRTextBox>
			</PGVRList>

			<PGVRCell align="rightrtl" height="25" newline="1" style="label">
				<PGVRvar var="i18n::translate('Total accepted changes: ')" /><PGVRListTotal />
			</PGVRCell>
		</PGVRBody>
		<PGVRFooter>
			<PGVRCell align="rightrtl" newline="1" style="date"><PGVRNow /></PGVRCell>
		</PGVRFooter>
	</PGVRDoc>
</PGVReport>
