<?page title="${labels.LimitsAgName}" contentType="text/html;charset=UTF-8"?>

<zk xmlns="http://www.zkoss.org/2005/zul"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
	<?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.limits.LimitsList')">
	<caption
			src="/img/invoicing-032.png"
			zclass="form-caption"
			label="${labels.LimitsAgName}" />

		<include src="/app/toolbar.zul" />
		<listbox
				vflex="1"
				model="@load(vm.dataList)"
				selectedItem="@bind(vm.dataBean)">
			<listhead menupopup="auto">
				<listheader
						label="${labels.LimitsWorkgroup}"
						sort="czech(name)"
						width="30%" />
				<listheader
						label="${labels.LimitsLimit}"
						sort="czech(description)"
						align="right"
						width="70%" />
				<listheader
						label="${labels.LimitsSpent}"
						sort="czech(description)"
						align="right"
						width="70%" />
			</listhead>
			<template name="model">
				<listitem>
					<listcell label="@load(each.workgroup)" />
					<listcell label="@load(each.limit) @converter(vm.standardBigDecimalConverter)" />
					<listcell label="@load(vm.spent[each]) @converter(vm.standardBigDecimalConverter)"/>
				</listitem>
			</template>
		</listbox>
		<div align="center" vflex="1">
			<image height="100%" content="@load(vm.chart)"/>
		</div>

	</window>

</zk>