You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2007/12/02 18:40:59 UTC
svn commit: r600347 - in /ofbiz/trunk/applications/accounting:
script/org/ofbiz/accounting/permissions/PermissionServices.xml
servicedef/services_finaccount.xml widget/CommonScreens.xml
widget/FinAccountScreens.xml widget/Menus.xml
Author: adrianc
Date: Sun Dec 2 09:40:57 2007
New Revision: 600347
URL: http://svn.apache.org/viewvc?rev=600347&view=rev
Log:
Accounting Financial Account permissions and UI work.
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml
ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml
ofbiz/trunk/applications/accounting/widget/Menus.xml
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml?rev=600347&r1=600346&r2=600347&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml Sun Dec 2 09:40:57 2007
@@ -85,4 +85,9 @@
<call-simple-method method-name="basePermissionCheck"/>
</simple-method>
+ <!-- Returns hasPermission=true if user has one of the base ACCOUNTING CRUD+ADMIN permissions -->
+ <simple-method method-name="acctgFinAcctPermissionCheck" short-description="Accounting financial account permission logic">
+ <call-simple-method method-name="basePermissionCheck"/>
+ </simple-method>
+
</simple-methods>
Modified: ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml?rev=600347&r1=600346&r2=600347&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Sun Dec 2 09:40:57 2007
@@ -368,4 +368,12 @@
<description>Automatic GC Reload Service</description>
<implements service="itemFulfillmentInterface"/>
</service>
+
+ <!-- Permission services -->
+ <service name="acctgFinAcctPermissionCheck" engine="simple"
+ location="component://accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml" invoke="acctgFinAcctPermissionCheck">
+ <description>Accounting Financial Account Permission Checking Logic</description>
+ <implements service="permissionInterface"/>
+ </service>
+
</services>
Modified: ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CommonScreens.xml?rev=600347&r1=600346&r2=600347&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Sun Dec 2 09:40:57 2007
@@ -285,41 +285,6 @@
</section>
</screen>
-
- <screen name="CommonFinAccountDecorator">
- <section>
- <actions>
- <set field="headerItem" value="FindFinAccount"/>
- </actions>
- <widgets>
- <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="body">
- <section>
- <!-- do check for ACCOUNTING, _VIEW permission -->
- <condition>
- <if-has-permission permission="ACCOUNTING" action="_VIEW"/>
- </condition>
- <widgets>
- <section>
- <condition><not><if-empty field-name="finAccountId"/></not></condition>
- <widgets>
- <include-menu name="FinAccountTabBar" location="component://accounting/widget/Menus.xml"/>
- <label style="head1" text="${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: [${uiLabelMap.CommonId}:${finAccountId}] ${${extraFunctionName}}"/>
- </widgets>
- </section>
- </widgets>
- <fail-widgets>
- <label style="head3" text="${uiLabelMap.AcccountingViewPermissionError}"/>
- </fail-widgets>
- </section>
- <decorator-section-include name="body"/>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
-
<screen name="main">
<section>
<actions>
Modified: ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml?rev=600347&r1=600346&r2=600347&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml Sun Dec 2 09:40:57 2007
@@ -20,6 +20,37 @@
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+
+ <screen name="CommonFinAccountDecorator">
+ <section>
+ <actions>
+ <set field="headerItem" value="FindFinAccount"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <section>
+ <condition>
+ <if-service-permission service-name="acctgFinAcctPermissionCheck" main-action="VIEW"/>
+ </condition>
+ <widgets>
+ <section>
+ <condition><not><if-empty field-name="finAccountId"/></not></condition>
+ <widgets>
+ <include-menu name="FinAccountTabBar" location="component://accounting/widget/Menus.xml"/>
+ </widgets>
+ </section>
+ </widgets>
+ <fail-widgets>
+ <label style="head3" text="${uiLabelMap.AcccountingViewPermissionError}"/>
+ </fail-widgets>
+ </section>
+ <decorator-section-include name="body"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
<screen name="FindFinAccount">
<section>
@@ -30,10 +61,14 @@
<set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
</actions>
<widgets>
- <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFinAccountDecorator">
<decorator-section name="body">
- <container><link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/></container>
- <container><label style="head1" text="${uiLabelMap.AccountingFindFinAccount}"/></container>
+ <container>
+ <label style="head1" text="${uiLabelMap.AccountingFindFinAccount}"/>
+ </container>
+ <container style="button-bar">
+ <link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/>
+ </container>
<include-form name="FindFinAccounts" location="component://accounting/widget/FinAccountForms.xml"/>
<include-form name="ListFinAccounts" location="component://accounting/widget/FinAccountForms.xml"/>
</decorator-section>
@@ -52,12 +87,19 @@
<entity-one entity-name="FinAccount" value-name="finAccount"/>
</actions>
<widgets>
- <decorator-screen name="CommonFinAccountDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFinAccountDecorator">
<decorator-section name="body">
<section>
<widgets>
<label style="head1" text="${uiLabelMap.AccountingEditFinAccount}"/>
- <container><link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/></container>
+ <section>
+ <condition><not><if-empty field-name="finAccountId"/></not></condition>
+ <widgets>
+ <container style="button-bar">
+ <link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/>
+ </container>
+ </widgets>
+ </section>
<include-form name="EditFinAccount" location="component://accounting/widget/FinAccountForms.xml"/>
</widgets>
</section>
@@ -72,8 +114,6 @@
<actions>
<set field="titleProperty" value="PageTitleEditFinAccountRole"/>
<set field="tabButtonItem" value="EditFinAccountRoles"/>
- <set field="labelTitleProperty" value="PageTitleEditFinAccountRole"/>
-
<set field="finAccountId" from-field="parameters.finAccountId"/>
<entity-one entity-name="FinAccount" value-name="finAccount"/>
<set field="partyId" from-field="parameters.partyId"/>
@@ -81,11 +121,12 @@
<set field="fromDate" from-field="parameters.fromDate"/>
</actions>
<widgets>
- <decorator-screen name="CommonFinAccountDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFinAccountDecorator">
<decorator-section name="body">
- <container><link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/></container>
- <include-form name="ListFinAccountRoles" location="component://accounting/widget/FinAccountForms.xml"/>
+ <label style="head1" text="${uiLabelMap.PageTitleEditFinAccountRole} ${uiLabelMap.CommonFor} ${finAccount.finAccountName} [${finAccountId}]"/>
+<!-- <container><link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/></container> -->
<include-form name="AddFinAccountRole" location="component://accounting/widget/FinAccountForms.xml"/>
+ <include-form name="ListFinAccountRoles" location="component://accounting/widget/FinAccountForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -97,17 +138,17 @@
<actions>
<set field="titleProperty" value="PageTitleEditFinAccountTrans"/>
<set field="tabButtonItem" value="EditFinAccountTrans"/>
- <set field="labelTitleProperty" value="PageTitleEditFinAccountTrans"/>
<set field="finAccountId" from-field="parameters.finAccountId"/>
<entity-one entity-name="FinAccount" value-name="finAccount"/>
<set field="finAccountTransId" from-field="parameters.finAccountTransId"/>
</actions>
<widgets>
- <decorator-screen name="CommonFinAccountDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFinAccountDecorator">
<decorator-section name="body">
- <container><link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/></container>
- <include-form name="ListFinAccountTransactions" location="component://accounting/widget/FinAccountForms.xml"/>
+ <label style="head1" text="${uiLabelMap.PageTitleEditFinAccountTrans} ${uiLabelMap.CommonFor} ${finAccount.finAccountName} [${finAccountId}]"/>
+<!-- <container><link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/></container> -->
<include-form name="AddFinAccountTrans" location="component://accounting/widget/FinAccountForms.xml"/>
+ <include-form name="ListFinAccountTransactions" location="component://accounting/widget/FinAccountForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -119,18 +160,18 @@
<actions>
<set field="titleProperty" value="PageTitleEditFinAccountAuths"/>
<set field="tabButtonItem" value="EditFinAccountAuths"/>
- <set field="labelTitleProperty" value="PageTitleEditFinAccountAuths"/>
<set field="finAccountId" from-field="parameters.finAccountId"/>
<entity-one entity-name="FinAccount" value-name="finAccount"/>
<set field="finAccountAuthId" from-field="parameters.finAccountAuthId"/>
<property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD" />
</actions>
<widgets>
- <decorator-screen name="CommonFinAccountDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFinAccountDecorator">
<decorator-section name="body">
- <container><link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/></container>
- <include-form name="ListFinAccountAuths" location="component://accounting/widget/FinAccountForms.xml"/>
+ <label style="head1" text="${uiLabelMap.PageTitleEditFinAccountAuths} ${uiLabelMap.CommonFor} ${finAccount.finAccountName} [${finAccountId}]"/>
+<!-- <container><link target="EditFinAccount" text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.AccountingFinAccount}" style="buttontext"/></container> -->
<include-form name="AddFinAccountAuth" location="component://accounting/widget/FinAccountForms.xml"/>
+ <include-form name="ListFinAccountAuths" location="component://accounting/widget/FinAccountForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=600347&r1=600346&r2=600347&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/Menus.xml Sun Dec 2 09:40:57 2007
@@ -389,7 +389,7 @@
</menu>
<menu name="FinAccountTabBar" default-menu-item-name="EditFinAccount" default-selected-style="selected"
- menu-container-style="button-bar button-style-1" type="simple">
+ menu-container-style="button-bar tab-bar" type="simple">
<menu-item name="EditFinAccount" title="${uiLabelMap.AccountingFinAccount}">
<link target="EditFinAccount?finAccountId=${finAccountId}"/>
</menu-item>