<?xml version="1.0" encoding="UTF-8"?>
<Report>
	<!-- $Id$ -->
	<Title><var var="WT_I18N::translate('Deaths')" /></Title>
	<Description><var var="WT_I18N::translate('A report of individuals who died in a given time or place.')" /></Description>
	<Input name="name" lookup="NAME" type="text"><var var="WT_I18N::translate('Name')" /></Input>
	<Input name="deathplace" lookup="PLAC" type="text"><var var="WT_I18N::translate('Death Place contains')" /></Input>
	<Input name="deathdate1" lookup="DATE" type="text"><var var="WT_I18N::translate('Death Date range start')" /></Input>
	<Input name="deathdate2" lookup="DATE" type="text"><var var="WT_I18N::translate('Death Date range end')" /></Input>
	<Input name="sortby" type="select" default="NAME" options="NAME=>WT_I18N::translate('sort by name')|DEAT:DATE=>WT_I18N::translate('sort by date of death')"><var var="WT_I18N::translate('Sort order')" /></Input>
	<Input name="adlist" type="select" default="none" options="none=>WT_I18N::translate('None')|_MARNM=>WT_Gedcom_Tag::getLabel('_MARNM')|HUSB=>WT_I18N::translate('Husband')"><var var="WT_I18N::translate('Name List')" /></Input>
	<Input name="pageSize" type="select" default="A4" options="letter=>WT_I18N::translate_c('paper size','Letter')|A3=>WT_I18N::translate_c('paper size', 'A3')|A4=>WT_I18N::translate_c('paper size','A4')|legal=>WT_I18N::translate_c('paper size','Legal')"><var var="WT_I18N::translate('Page size')" /></Input>
	<Input name="fonts" type="select" default="dejavusans" options="arialunicid0=>WT_I18N::translate_c('font name', 'Arial')|dejavusans=>WT_I18N::translate_c('font name', 'DejaVu')|helvetica=>WT_I18N::translate_c('font name', 'Helvetica')"><var var="WT_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"/>

	<Doc pageSize="$pageSize" orientation="landscape">
		<Header>
			<Cell align="center" height="20" newline="1" style="header"><var var="WT_I18N::translate('Deaths')" /></Cell>
			<Cell align="rightrtl" newline="1" style="pagenum"><var var="WT_I18N::translate('Page')" /> <PageNum /> <var var="WT_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="200">
				<Text style="label"><var var="WT_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="100">
				<Text style="label"><var var="WT_I18N::translate('Date')" /></Text>
			</TextBox>

			<TextBox border="1" width="150">
				<Text style="label"><var var="WT_I18N::translate('Place')" /></Text>
			</TextBox>

			<TextBox border="1" newline="1">
			  <Text style="label"><var var="WT_I18N::translate('Source')" /></Text>
			</TextBox>
		</Header>

		<Body>
			<List list="individual" filter1="DEAT:PLAC CONTAINS $deathplace" filter2="DEAT:DATE GTE $deathdate1" filter3="DEAT:DATE LTE $deathdate2" filter4="NAME CONTAINS $name" sortby="$sortby">
				<TextBox width="200">
					<Text style="text"><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>
					</Text>
				</TextBox>
				<TextBox width="100">
					<Text style="text"><GedcomValue tag="DEAT:DATE" newline="1" /></Text>
				</TextBox>
				<TextBox width="150">
					<Text style="text"><GedcomValue tag="DEAT:PLAC" /></Text>
				</TextBox>
				<TextBox newline="1">
					<!-- Only with multiple sources use line feed (br) -->
					<SetVar name="usebr" value="0"/>
					<Text style="text">
						<RepeatTag tag="DEAT:SOUR">
							<Gedcom id="@SOUR">
								<if condition="$usebr==1"><br /></if>
								<if condition="@AUTH!=''"><GedcomValue tag="AUTH" />, </if>
								«<GedcomValue tag="TITL" />»
								<if condition="@PUBL!=''"> (<GedcomValue tag="PUBL" />)</if>
							</Gedcom>
							<if condition="@PAGE!=''">: <GedcomValue tag="SOUR:PAGE" /></if>
							 <GedcomValue tag="SOUR:DATA:TEXT" />
							<SetVar name="usebr" value="1"/>
						</RepeatTag>
					</Text>
				</TextBox>
			</List>
			<Cell align="rightrtl" height="24" newline="1" style="label"><br/><var var="WT_I18N::translate('Total individuals')"/>: <ListTotal/></Cell>
		</Body>
		<Footer>
			<Cell align="rightrtl" newline="1" style="date"><Now/></Cell>
		</Footer>
	</Doc>
</Report>
