Agenda na správu uživatelů

This commit is contained in:
2014-05-11 00:54:42 +02:00
parent 202825322a
commit 6462fb3806
21 changed files with 447 additions and 74 deletions
+30 -2
View File
@@ -1,6 +1,34 @@
<?page title="Uživatel" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Uživatel" border="normal">
<window id="editWin" title="Uživatel" border="normal" closable="true" width="450px" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.UserForm')">
<style src="/app/form.css"/>
<grid width="440px">
<columns>
<column hflex="min"></column>
<column></column>
<column></column>
</columns>
<rows>
<row><label value="Login"/><textbox value="@bind(vm.dataBean.username)" instant="true" disabled="@load(vm.edit)" onChange="@command('checkLogin')"/><label value="Login je obsazený" sclass="error" visible="@load(not vm.loginFree)"/></row>
<row><label value="Jméno"/><textbox value="@bind(vm.dataBean.firstName)"/></row>
<row><label value="Příjmení"/><textbox value="@bind(vm.dataBean.lastName)"/></row>
<row><label value="Osobní číslo"/><textbox value="@bind(vm.dataBean.personalNumber)" width="90px"/></row>
<row><label value="E-mail"/><textbox value="@bind(vm.dataBean.email)"/></row>
<row><label value=""/><checkbox label="Zasílat upozornění" checked="@bind(vm.dataBean.notify)"/></row>
<row><label value="Heslo"/><textbox value="@bind(vm.password)" type="password" instant="true"/></row>
<row><label value="Znova heslo"/><textbox value="@bind(vm.retPasswd)" type="password" instant="true"/><label value="Hesla nesouhlasí" sclass="error" visible="@load(not vm.pwMatches)"/></row>
<row><label value=""/><checkbox label="Aktivní" checked="@bind(vm.dataBean.enabled)"/></row>
</rows>
</grid>
<groupbox mold="3d">
<caption label="Role"/>
<vbox children="@load(vm.userRoles.roleChecks)">
<template name="children">
<checkbox label="@load(each.role.description)" checked="@bind(each.checked)"/>
</template>
</vbox>
</groupbox>
<button image="/img/save.png" label="Uložit" onClick="@command('save', window=editWin) @global-command('refresh')" disabled="@load(not vm.canSave)" sclass="nicebutton" /><button image="~./zul/img/misc/drag-disallow.png" label="Zavřít" onClick="editWin.detach()" sclass="nicebutton"/>
</window>
</zk>
+26 -4
View File
@@ -2,22 +2,44 @@
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window title="Uživatelé" border="normal" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.UsersList')" height="570px">
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.UsersList')" height="570px">
<include src="/app/toolbar.zul"/>
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)">
<auxhead sclass="category-center" visible="@load(vm.filter)">
<auxheader>
<image src="/img/funnel.png" />
<textbox value="@bind(vm.filterTemplate.username)" instant="true" onChange="@command('doFilter')"/>
</auxheader>
<auxheader>
<image src="/img/funnel.png" />
<textbox value="@bind(vm.filterTemplate.personalNumber)" instant="true" onChange="@command('doFilter')"/>
</auxheader>
<auxheader>
<image src="/img/funnel.png" />
<textbox value="@bind(vm.filterTemplate.firstName)" instant="true" onChange="@command('doFilter')"/>
</auxheader>
<auxheader>
<image src="/img/funnel.png" />
<textbox value="@bind(vm.filterTemplate.lastName)" instant="true" onChange="@command('doFilter')"/>
</auxheader>
</auxhead>
<listhead>
<listheader label="Login"/>
<listheader label="Celé jméno"/>
<listheader label="Osobní číslo"/>
<listheader label="Jméno"/>
<listheader label="Příjmení"/>
</listhead>
<template name="model">
<listitem>
<listcell label="@load(each.username)"/>
<listcell label="@load(each.fullName)"/>
<listcell label="@load(each.personalNumber)"/>
<listcell label="@load(each.firstName)"/>
<listcell label="@load(each.lastName)"/>
</listitem>
</template>
</listbox>
</window>
</zk>