<?xml version="1.0" encoding="UTF-8"?>
<Report>
<!-- $Id$ -->
	<Title><var var="i18n::translate('Cemetery Report')" /></Title>
	<Description>Prints a list of individuals burial places matching specific cemetery criteria</Description>
	<Input name="deathplace" lookup="PLAC" type="text"><var var="i18n::translate('Burial Place contains')" /> </Input>
	<Input name="sortby" type="select" default="NAME" options="none=>i18n::translate('None')|ID=>i18n::translate('ID number')|NAME=>i18n::translate('Name')|DEAT:DATE=>i18n::translate('Date of death')"><var var="i18n::translate('Sort by')" /></Input>
	<Input name="adlist" type="select" default="none" options="none=>i18n::translate('None')|_MARNM=>translate_fact('_MARNM')|HUSB=>i18n::translate('Husband')"><var var="i18n::translate('Name List')" /></Input>
	<Input 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')"><var var="i18n::translate('Page size')" /></Input>
	<Input 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')"><var var="i18n::translate('Font')"/></Input>

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

	<!-- landscape orientation -->
	<SetVar name="namewidth" value="185"/>
	<SetVar name="datewidth" value="95"/>
	<SetVar name="cemewidth" value="150"/>
	<SetVar name="placewidth" value="175"/>

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

			<SetVar name="fill" value="" />
			<if condition="($sortby=='NAME') or ($sortby=='ID')"><SetVar name="fill" value="#AAAAAA" /></if>
			<TextBox bgcolor="$fill" border="1" width="$namewidth">
				<Text style="label"><var var="i18n::translate('Name')" /></Text>
			</TextBox>

			<SetVar name="fill" value="" />
			<if condition="$sortby=='DEAT:DATE'"><SetVar name="fill" value="#AAAAAA" /></if>
			<TextBox bgcolor="$fill" border="1" width="$datewidth">
				<Text style="label"><var var="translate_fact('DEAT:DATE')" /></Text>
			</TextBox>
			<!-- should print and sort by burial date -->

			<SetVar name="fill" value="" />
			<if condition="$sortby=='BURI'"><SetVar name="fill" value="#AAAAAA" /></if>
			<TextBox bgcolor="$fill" border="1" width="$cemewidth">
				<Text style="label"><var var="i18n::translate('Cemetery')" /></Text>
			</TextBox>

			<SetVar name="fill" value="" />
			<if condition="$sortby=='PLAC'"><SetVar name="fill" value="#AAAAAA" /></if>
			<TextBox bgcolor="$fill" border="1" width="$placewidth">
				<Text style="label"><var var="i18n::translate('Place')" /></Text>
			</TextBox>

			<TextBox border="1" newline="1">
				<Text style="label"><var var="i18n::translate('Note')" /></Text>
			</TextBox>
		</Header>
		<Body>
			<List list="individual" filter1="BURI:PLAC CONTAINS $deathplace" sortby="$sortby">
				<Cell style="text" width="$namewidth"><GetPersonName id="" /> - (<GedcomValue tag="@id" />)
					<if condition="$adlist=='_MARNM'">
						<RepeatTag tag="NAME:_MARNM">
							<br /><GedcomValue tag="_MARNM" />
						</RepeatTag>
					</if>
					<if condition="($adlist=='HUSB') and (@SEX=='F')">
						<RepeatTag tag="FAMS">
							<Gedcom id="@FAMS:@HUSB">
								<br /><GetPersonName id="" />
							</Gedcom>
						</RepeatTag>
					</if>
				</Cell>
				<Cell style="text" width="$datewidth"><GedcomValue tag="DEAT:DATE" newline="1" /></Cell>
				<Cell style="text" width="$cemewidth"><GedcomValue tag="BURI:CEME" /></Cell>
				<Cell style="text" width="$placewidth"><GedcomValue tag="BURI:PLAC" /></Cell>
				<Cell newline="1" style="text"><GedcomValue tag="BURI:NOTE" /></Cell>
			</List>
			<Cell align="rightrtl" newline="1" style="label"><br /><var var="i18n::translate('Total individuals')" />: <ListTotal /></Cell>
		</Body>
		<Footer>
			<Cell align="rightrtl" newline="1" style="date"><Now /></Cell>
		</Footer>
	</Doc>
</Report>
