Umožněna deaktivace modulu prostřednictvím nastavení objektu modulu ve

třídě Constants. Položku neaktivního modulu v menu lze skrýt funkcí
isActive definovanou v module.tld (viz mainMenu.zul).
This commit is contained in:
2015-01-07 17:03:58 +01:00
parent b1818546c0
commit cf6c523698
16 changed files with 239 additions and 36 deletions
@@ -356,3 +356,8 @@ WorkgroupFormCannotAddUser=Uživatele nelze přidat
WorkgroupFormCannotAddWorkgroup=Komisi nelze přidat
WorkgroupFormOrderLimit=Limit nákupů
WorkgroupIsInWorkgroup=Komisi nelze smazat, protože je členem některého střediska
Help=Příručka
GoogleDriveUrl=Odkaz na Google Drive
ModuleNotActive=Modul není aktivovaný
+17
View File
@@ -0,0 +1,17 @@
<!DOCTYPE xml>
<taglib>
<uri></uri>
<description>
Methods and actions for ZK + application modules
</description>
<function>
<name>isActive</name>
<function-class>info.bukova.isspst.ModuleUtils</function-class>
<function-signature> boolean isActive(java.lang.String id)
</function-signature>
<description>
Return true if module represented by id is active.
</description>
</function>
</taglib>
+5
View File
@@ -186,6 +186,11 @@
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/error.zul</location>
</error-page>
<welcome-file-list>
<welcome-file>index.zul</welcome-file>
+3 -1
View File
@@ -1,6 +1,7 @@
<?page title="Main Menu" contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?taglib uri="/WEB-INF/security.tld" prefix="sec"?>
<?taglib uri="/WEB-INF/module.tld" prefix="module"?>
<zk xmlns:n="native">
<menubar
id="menubar"
@@ -39,7 +40,8 @@
image="/img/invoicing-016.png"
label="${labels.Invoicing}"
href="/main/invoicing/"
disabled="${not sec:isAllGranted('PERM_READ_INVOICING')}" />
disabled="${not sec:isAllGranted('PERM_READ_INVOICING')}"
visible="${module:isActive('INVOICING') }" />
</menupopup>
</menu>
<menu label="${labels.BussinessTrips}">
+8
View File
@@ -0,0 +1,8 @@
<?page title="${labels.Error}" contentType="text/html;charset=UTF-8"?>
<zk>
<zscript>
String gridZul = "/errorWindow.zul";
</zscript>
<include src="/app/template.zhtml"/>
</zk>
+12
View File
@@ -0,0 +1,12 @@
<?page title="${labels.Error}" contentType="text/html;charset=UTF-8"?>
<zk>
<window border="normal"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.ErrorVM')"
vflex="1">
<caption zclass="form-caption" label="${labels.Error}" />
<label value="@load(vm.message)"/>
</window>
</zk>