Systém přístupových práv

This commit is contained in:
2014-05-18 20:19:39 +02:00
parent acfc0ce17e
commit bfd9371a35
31 changed files with 703 additions and 33 deletions
@@ -0,0 +1,10 @@
<?page title="Uživatelé" contentType="text/html;charset=UTF-8"?>
<zk>
<zscript>
String gridZul = "permissions.zul";
</zscript>
<include src="../../app/template.zhtml"/>
</zk>
@@ -0,0 +1,24 @@
<?page title="Uživatel" contentType="text/html;charset=UTF-8"?>
<zk>
<window id="editWin" title="Uživatel" border="normal" closable="true" width="550px" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.PermissionForm')">
<style src="/app/form.css"/>
<label value="@load(vm.dataBean.description)" style="font-weight: bold;"/>
<vbox children="@load(vm.modules)" width="530px">
<template name="children" var="module">
<groupbox closable="false" mold="3d" width="530px">
<caption label="@load(module.name)"/>
<hbox children="@load(vm.rolePerms.permissionChecks)">
<template name="children" var="perm">
<checkbox label="@load(perm.permission.description)" checked="@bind(perm.checked)" visible="@load(perm.permission.module eq module.id)"/>
</template>
</hbox>
</groupbox>
</template>
</vbox>
<include src="/app/formButtons.zul"/>
</window>
</zk>
@@ -0,0 +1,42 @@
<?page title="Práva" contentType="text/html;charset=UTF-8"?>
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window title="Práva" border="normal" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.PermissionsList')" height="570px">
<toolbar>
<toolbarbutton image="/img/edit.png" tooltiptext="Upravit" id="btnEdit" onClick="@command('edit')" disabled="@load(empty vm.dataBean ? 'true' : 'false')"/>
</toolbar>
<hbox width="100%">
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="300px">
<listhead>
<listheader label="Role"/>
</listhead>
<template name="model">
<listitem>
<listcell label="@load(each.description)"/>
</listitem>
</template>
</listbox>
<panel hflex="1" height="480px">
<panelchildren style="overflow:auto;">
<label value="Práva modulů:" style="font-weight: bold;"/>
<vbox children="@load(vm.modules)" hflex="1">
<template name="children" var="module">
<groupbox closable="false" mold="3d" hflex="1">
<caption label="@load(module.name)"/>
<hbox children="@load(vm.dataBean.permissions)">
<template name="children" var="perm">
<label value="@load(perm.description.concat(', '))" visible="@load(module.id eq perm.module)"/>
</template>
</hbox>
</groupbox>
</template>
</vbox>
</panelchildren>
</panel>
</hbox>
</window>
</zk>
+23 -2
View File
@@ -5,8 +5,9 @@
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)">
<hbox width="100%" height="500px">
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)" width="650px" height="480px">
<auxhead sclass="category-center" visible="@load(vm.filter)">
<auxheader>
<image src="/img/funnel.png" />
@@ -40,6 +41,26 @@
</listitem>
</template>
</listbox>
<panel hflex="1" height="480px" width="70%">
<panelchildren style="overflow:auto;">
<label value="Efektivní práva:" style="font-weight: bold;"/>
<vbox children="@load(vm.modules)" hflex="1">
<template name="children" var="module">
<groupbox closable="false" mold="3d" hflex="1">
<caption label="@load(module.name)"/>
<hbox children="@load(vm.permissions)">
<template name="children" var="perm">
<label value="@load(perm.description.concat(', '))" visible="@load(module.id eq perm.module)"/>
</template>
</hbox>
</groupbox>
</template>
</vbox>
</panelchildren>
</panel>
</hbox>
</window>
</zk>