<?xml version="1.0" encoding="UTF-8" ?>
<Report>
	<Title><var var="I18N::translate('Burials')" /></Title>
	<Description><var var="I18N::translate('A report of individuals who were buried in a given place.')" /></Description>
	<Input name="deathplace" lookup="PLAC" type="text"><var var="I18N::translate('Burial place contains')" /> </Input>
	<Input name="sortby" type="select" default="NAME" options="NAME=>I18N::translate('sort by name')|DEAT:DATE=>I18N::translate('sort by date of death')"><var var="I18N::translate('Sort order')" /></Input>
	<Input name="adlist" type="select" default="none" options="none=>I18N::translate('None')|_MARNM=>I18N::translate('Married name')|HUSB=>I18N::translate('Husband')"><var var="I18N::translate('Names')" /></Input>
	<Input name="pageSize" type="select" options="A4=>I18N::translateContext('paper size','A4')|A3=>I18N::translateContext('paper size', 'A3')|US-Letter=>I18N::translateContext('paper size','Letter')|US-Tabloid=>I18N::translateContext('paper size','Tabloid')"><var var="I18N::translate('Page size')" /></Input>
	<SetVar name="fonts" value="dejavusans" />

	<!-- 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="115"/>
	<SetVar name="placewidth" value="200"/>

	<Doc pageSize="$pageSize" orientation="landscape">
		<Header>
			<Cell align="center" height="20" newline="1" style="header"><var var="I18N::translate('Burials')" /></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'"><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="I18N::translate('Date of death')" /></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="I18N::translate('Date of burial')" /></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 of burial')" /></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" filter2="LIKE /%\n1 BURI%/" sortby="$sortby">
				<Cell style="text" width="$namewidth"><GetPersonName 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="$datewidth">
					<GedcomValue tag="BURI:DATE" newline="1" />
				</Cell>
				<Cell style="text" width="$placewidth">
					<GedcomValue tag="BURI:CEME" />
					<if condition="@BURI:CEME !== ''">, </if>
					<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>
