<?page title="${labels.TravelOrders}" contentType="text/html;charset=UTF-8"?>
<zk>
	<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
	<window
		vflex="1"
		border="normal"
		apply="org.zkoss.bind.BindComposer"
		viewModel="@id('vm') @init('info.bukova.isspst.ui.tripbill.TripBillList')">
		<caption
			src="/img/pickup-032.png"
			zclass="form-caption"
			label="${labels.TravelOrders}" />
		<include src="/app/toolbar.zul" />
		<listbox
			vflex="1"
			model="@load(vm.dataList)"
			selectedItem="@bind(vm.dataBean)">
			<listhead menupopup="auto">
				<listheader
					label="${labels.TravelOrdersGridNumser}"
					sort="czech(numser)"
					width="30%" />
				<listheader
					label="${labels.TravelOrdersGridReqDate}"
					sort="auto(requirement.reqDate)"
					width="70%" />
				<listheader
					label="${labels.TravelOrdersGridFrom}"
					sort="czech(requirement.from)"
					width="70%" />
				<listheader
					label="${labels.TravelOrdersGridTo}"
					sort="czech(requirement.to)"
					width="70%" />
				<listheader
					label="${labels.TravelOrdersGridTotal}"
					sort="auto(total)"
					align="right"
					width="70%" />
			</listhead>
			<!-- <auxhead
				sclass="category-center"
				visible="@load(vm.filter)">
				<auxheader>
					<div sclass="find-grid-cell">
						<div sclass="find-grid-divtextbox">
							<textbox
								value="@bind(vm.filterTemplate.name)"
								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>
			</auxhead> -->
			<template name="model">
				<listitem>
					<listcell label="@load(each.requirement.numser)" />
					<listcell label="@load(each.requirement.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
					<listcell label="@load(each.requirement.from)" />
					<listcell label="@load(each.requirement.to)" />
					<listcell label="@load(each.total) @converter(vm.standardBigDecimalConverter)"/>
				</listitem>
			</template>
		</listbox>
	</window>
</zk>