
<hlayout vflex="1">
	<listbox
		vflex="1"
		hflex="60"
		mold="paging"
		pagingPosition="bottom"
		autopaging="true"
		selectedItem="@bind(vm.dataBean)"
		onSelect="@command('onChangeSelectSignedDocs', ctrl=self)"
		model="@load(vm.dataList)">
		<listhead menupopup="auto">
			<listheader
				hflex="7"
				sort="czech(agendaName)"
				label="${labels.AgendaName}" />
			<listheader
				hflex="4"
				sort="czech(numser)"
				label="${labels.number}" />
			<listheader
				hflex="20"
				sort="czech(description)"
				label="${labels.OrderFormDescription}" />
			<listheader
				hflex="5"
				onCreate="self.sort(false)"
				sort="auto(signDate)"
				label="${labels.SigningDate}" />
		</listhead>
		<auxhead visible="@load(vm.filter)">
			<auxheader>
				<div sclass="find-grid-cell">
					<div sclass="find-grid-divtextbox">
						<textbox
							value="@bind(vm.filterTemplate.agendaName)"
							instant="true"
							onChange="@command('doFilter')"
							maxlength="@load(vm.lengthText)"
							sclass="find-grid-textbox" />
					</div>
					<div sclass="find-grid-img">
						<image src="/img/funnel.png" />
					</div>
				</div>
			</auxheader>
			<auxheader>
				<div sclass="find-grid-cell">
					<div sclass="find-grid-divtextbox">
						<textbox
							value="@bind(vm.filterTemplate.numser)"
							instant="true"
							onChange="@command('doFilter')"
							maxlength="@load(vm.lengthText)"
							sclass="find-grid-textbox" />
					</div>
					<div sclass="find-grid-img">
						<image src="/img/funnel.png" />
					</div>
				</div>
			</auxheader>
			<auxheader>
				<div sclass="find-grid-cell">
					<div sclass="find-grid-divtextbox">
						<textbox
							value="@bind(vm.filterTemplate.description)"
							instant="true"
							onChange="@command('doFilter')"
							maxlength="@load(vm.lengthDescription)"
							sclass="find-grid-textbox" />
					</div>
					<div sclass="find-grid-img">
						<image src="/img/funnel.png" />
					</div>
				</div>
			</auxheader>
			<auxheader>
				<div sclass="find-grid-cell">
					<div sclass="find-grid-divtextbox">
						<datebox
							value="@bind(vm.filterTemplate.signDate)"
							format="${labels.DateFormat}"
							instant="true"
							onChange="@command('doFilter')"
							sclass="find-grid-textbox"
							width="100%" />
					</div>
					<div sclass="find-grid-img">
						<image src="/img/funnel.png" />
					</div>
				</div>
			</auxheader>
		</auxhead>
		<template name="model">
			<listitem>
				<listcell label="@load(each.agendaName)" />
				<listcell label="@load(each.numser)" />
				<listcell label="@load(each.description)" />
				<listcell label="@load(each.signDate) @converter('formatedDate', format=labels.DateFormat)" />
			</listitem>
		</template>
	</listbox>
	<listbox
		vflex="1"
		hflex="40"
		selectedItem="@bind(vm.signedDocumentItem)"
		model="@load(vm.signedDocumentItems)">
		<listhead menupopup="auto">
			<listheader
				hflex="2"
				sort="czech(actualReportName)"
				label="${labels.PrintReports}" />
			<listheader
				hflex="3"
				sort="czech(fileName)"
				label="${labels.FileName}" />
			<listheader hflex="1" />
		</listhead>
		<template name="model">
			<listitem>
				<listcell label="@load(each.actualReportName)" />
				<listcell label="@load(each.fileName)" />
				<listcell>
					<button
						label="Otevřít"
						onClick="@command('onOpen', item = each)"
						sclass="nicebutton" />
				</listcell>
			</listitem>
		</template>
	</listbox>
</hlayout>
