<?page contentType="text/html;charset=UTF-8"?>
<zk>
<window id="reportDialog" border="normal" apply="org.zkoss.bind.BindComposer"
	viewModel="@id('vm') @init('info.bukova.isspst.ui.reporting.ReportDialogVM')"
	closable="true" width="550px">
	<caption src="/img/print.png" zclass="form-caption" label="${labels.ReportReports}" />
	
	<hbox>
	<listbox model="@load(vm.reports)" width="250px" height="350px" selectedItem="@bind(vm.selected)">
		<template name="model">
			<listitem disabled="@load(each.singleRecord and (empty vm.singleObject or (each.hasCondition and not vm.canPrint) ))">
				<listcell><label value="@load(each.name)"/></listcell>
			</listitem>
		</template>
	</listbox>
	<include src="@load(vm.optionsForm)"/>
	</hbox>
	<hbox>
		<button image="/img/print-button.png" label="${labels.ReportPrint}" onClick="@command('print', window=reportDialog)" sclass="nicebutton" disabled="@bind(empty vm.selected)"/> <button image="~./zul/img/misc/drag-disallow.png" label="${labels.ButtonStorno}" onClick="reportDialog.detach()" sclass="nicebutton"/>
	</hbox>
	
</window>
</zk>