<?page title="${labels.AgendaSearch}" contentType="text/html;charset=UTF-8"?>
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>

	<window border="normal" closable="false"
		apply="org.zkoss.bind.BindComposer"
		viewModel="@id('vm') @init('info.bukova.isspst.ui.search.SearchForm')"
		vflex="1">
		<caption src="/img/search-032.png" zclass="form-caption" label="${labels.AgendaSearch}" />

    <vbox width="100%"
      vflex="1">
		  <hbox hflex="1" align="center">
			  <div align="center" hflex="1">
			    <vbox>
			    <image src="/img/lucene_logo.png"/>
					  <hbox>
						  <textbox value="@bind(vm.keyWord)" instant="true" width="250px" onOK="@command('doSearch')"/>
						  <button label="${labels.Search}" onClick="@command('doSearch')" sclass="nicebutton" image="/img/search.png" />
					  </hbox>
					</vbox>
				</div>
			</hbox>
			<panel hflex="1" vflex="1">
        <panelchildren style="overflow:auto;">
					<vbox children="@load(vm.results)" width="100%">
		        <template name="children">
		          <vbox width="100%">
		            <separator bar="true" width="100%"/>
		            <label value="@load(each.recordName)" style="font-weight: bold; font-size:14px;"/>
		            <label value="@load(each.description)"/>
		            <hbox>
		              <label value="${labels.created}: "/>
		              <label value="@load(each.created)"/>
		            </hbox>
		            <hbox>
                  <label value="${labels.ownedBy}: "/>
                  <label value="@load(each.ownedBy)"/>
                </hbox>
                <hbox>
                  <label value="${labels.modified}: "/>
                  <label value="@load(each.modified)"/>
                </hbox>
                <hbox>
                  <label value="${labels.modifiedBy}: "/>
                  <label value="@load(each.modifiedBy)"/>
                </hbox>
		            <a href="@load(each.url)" label="@load(each.url)"/>
		          </vbox>
		        </template>			
					</vbox>
				</panelchildren>
			</panel>
		</vbox>

	</window>
</zk>