Author: adrianc
Date: Tue May 20 22:40:56 2008
New Revision: 658559
URL: http://svn.apache.org/viewvc?rev=658559&view=rev
Log:
Improved Find Fixed Asset screen. Follows layout best practices by using the
Find screen decorator, adds search options, uses Ajax for list navigation, uses
permission service checking so the screen can be reused.
Modified:
ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml
ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml
Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=658559&r1=658558&r2=658559&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Tue May
20 22:40:56 2008
@@ -1920,6 +1920,16 @@
<value xml:lang="ru">ÐоиÑк ÑинанÑовÑÑ
ÑÑеÑов</value>
<value
xml:lang="th">à¸à¹à¸à¸«à¸²à¸à¸à¸à¸³à¹à¸£à¸ªà¸°à¸ªà¸¡à¹à¸¥à¸°à¸à¸à¹à¸ªà¸à¸à¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸à¸¥à¸à¸à¸²à¸à¸°à¸à¸²à¸£à¹à¸à¸´à¸</value>
</property>
+ <property key="AccountingFindFixedAssets">
+ <value xml:lang="en">Find Fixed Assets</value>
+ <value xml:lang="es">Lista Activos Fijos</value>
+ <value xml:lang="fr">Liste des actifs immobilisés</value>
+ <value xml:lang="it">Lista Cespiti</value>
+ <value xml:lang="ro">Lista Mijloace Fixe</value>
+ <value xml:lang="ru">СпиÑок оÑновнÑÑ
ÑÑедÑÑв</value>
+ <value
xml:lang="th">รายà¸à¸²à¸£à¸à¸£à¸±à¸à¸¢à¹à¸ªà¸´à¸à¹à¸¡à¹à¸«à¸¡à¸¸à¸à¹à¸§à¸µà¸¢à¸</value>
+ <value xml:lang="zh">åºå®èµäº§å表</value>
+ </property>
<property key="AccountingFindInvoices">
<value xml:lang="ar">Ø¥ÙØ¬Ø§Ø¯ اÙÙÙØ§ØªÙر</value>
<value xml:lang="en">Find Invoices</value>
@@ -6818,7 +6828,7 @@
</property>
<property key="FormFieldTitle_fixedAssetTypeId">
<value xml:lang="ar">دÙÙÙ Ø§ÙØ£ØµÙ Ø§ÙØ«Ø§Ø¨Øª</value>
- <value xml:lang="en">Fixed Type Id</value>
+ <value xml:lang="en">Fixed Asset Type Id</value>
<value xml:lang="es">Id tipo fijado</value>
<value xml:lang="fr">Type d'actif immobilisé</value>
<value xml:lang="it">Tipo Cespite</value>
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=658559&r1=658558&r2=658559&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
(original)
+++
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
Tue May 20 22:40:56 2008
@@ -651,6 +651,7 @@
<!-- =============== Fixed Asset mapping =================-->
<request-map uri="ListFixedAssets"><security https="true"
auth="true"/><response name="success" type="view"
value="ListFixedAssets"/></request-map>
+ <request-map uri="FixedAssetSearchResults"><security https="true"
auth="false"/><response name="success" type="view"
value="FixedAssetSearchResults"/></request-map>
<request-map uri="EditFixedAsset"><security https="true"
auth="true"/><response name="success" type="view"
value="EditFixedAsset"/></request-map>
<request-map uri="createFixedAsset">
<security https="true" auth="true"/>
@@ -1889,6 +1890,7 @@
<!-- FixedAsset -->
<view-map name="ListFixedAssets" type="screen"
page="component://accounting/widget/FixedAssetScreens.xml#ListFixedAssets"/>
+ <view-map name="FixedAssetSearchResults" type="screen"
page="component://accounting/widget/FixedAssetScreens.xml#FixedAssetSearchResults"/>
<view-map name="EditFixedAsset" type="screen"
page="component://accounting/widget/FixedAssetScreens.xml#EditFixedAsset"/>
<view-map name="ListFixedAssetProducts" type="screen"
page="component://accounting/widget/FixedAssetScreens.xml#ListFixedAssetProducts"/>
<view-map name="addFixedAssetProduct" type="screen"
page="component://accounting/widget/FixedAssetScreens.xml#addFixedAssetProduct"/>
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml?rev=658559&r1=658558&r2=658559&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml
(original)
+++
ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml
Tue May 20 22:40:56 2008
@@ -21,8 +21,14 @@
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
<!-- list all assets in a tabular format -->
- <form name="ListFixedAssets" type="list" list-name="fixedAssets"
paginate-target="ListFixedAssets"
- odd-row-style="alternate-row" default-table-style="basic-table
hover-bar">
+ <form name="ListFixedAssets" type="list" list-name="listIt"
paginate-target="ListFixedAssets"
+ odd-row-style="alternate-row" header-row-style="header-row-2"
default-table-style="basic-table hover-bar">
+ <actions>
+ <service service-name="performFind" result-map-name="result"
result-map-list-name="listIt">
+ <field-map field-name="inputFields" env-name="parameters"/>
+ <field-map field-name="entityName" value="FixedAsset"/>
+ </service>
+ </actions>
<field name="fixedAssetId" widget-style="linktext">
<hyperlink also-hidden="false" description="${fixedAssetId}"
target="EditFixedAsset?fixedAssetId=${fixedAssetId}"/>
</field>
@@ -32,9 +38,14 @@
<field name="fixedAssetTypeId"><display-entity
entity-name="FixedAssetType"/></field>
<field name="parentFixedAssetId">
<display-entity entity-name="FixedAsset"
key-field-name="fixedAssetId" description="${fixedAssetName}">
- <sub-hyperlink
target="EditFixedAsset?fixedAssetId=${parentFixedAssetId}"
description="${parentFixedAssetId}" link-style="buttontext"/>
+ <sub-hyperlink
target="EditFixedAsset?fixedAssetId=${parentFixedAssetId}"
description="${parentFixedAssetId}"/>
</display-entity>
</field>
+ <on-event-update-area event-type="paginate" area-id="search-results"
area-target="FixedAssetSearchResults"/>
+ </form>
+ <form name="FindFixedAssetOptions" extends="lookupFixedAsset"
extends-resource="component://accounting/webapp/accounting/lookup/FieldLookupForms.xml"
+ target="ListFixedAssets">
+ <field name="submitButton" title="${uiLabelMap.CommonFind}"
widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<!-- create and update a fixed asset -->
Modified: ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CommonScreens.xml?rev=658559&r1=658558&r2=658559&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Tue May 20
22:40:56 2008
@@ -104,38 +104,6 @@
</section>
</screen>
- <screen name="CommonFixedAssetDecorator">
- <section>
- <actions>
- <set field="headerItem" value="ListFixedAssets"/>
- </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="fixedAssetId"/></not></condition>
- <widgets>
- <include-menu name="FixedAssetTabBar"
location="component://accounting/widget/Menus.xml"/>
- <label style="h1"
text="${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}:
${fixedAsset.fixedAssetName} [${uiLabelMap.CommonId}:${fixedAssetId}]
${${extraFunctionName}}"/>
- </widgets>
- </section>
- </widgets>
- <fail-widgets>
- <label style="h3"
text="${uiLabelMap.AcccountingViewPermissionError}"/>
- </fail-widgets>
- </section>
- <decorator-section-include name="body"/>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
<screen name="CommonTaxAuthorityDecorator">
<section>
<actions>
Modified: ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml?rev=658559&r1=658558&r2=658559&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml Tue May 20
22:40:56 2008
@@ -21,45 +21,86 @@
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
- <!-- list all assets in a tabular format -->
- <screen name="ListFixedAssets">
+ <screen name="CommonFixedAssetDecorator">
<section>
<actions>
- <set field="titleProperty" value="PageTitleListFixedAssets"/>
- <set field="tabButtonItem" value="ListFixedAssets"/>
- <entity-condition entity-name="FixedAsset"
list-name="fixedAssets">
- <!-- <condition-list>
- <condition-expr field-name="fixedAssetId"
operator="greater" value=" "/>
- <!- - <condition-expr field-name="fixedAssetTypeId"
operator="not-equals" value="GROUP_EQUIPMENT"/> - ->
- </condition-list> -->
- </entity-condition>
+ <set field="headerItem" value="ListFixedAssets"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label
text="${uiLabelMap.AccountingFixedAssets}"/>
- </container>
- </container>
- <container style="screenlet-body">
+ <section>
+ <condition>
+ <if-service-permission
service-name="fixedAssetPermissionCheck" main-action="VIEW"/>
+ </condition>
+ <widgets>
<section>
+ <condition><not><if-empty
field-name="fixedAssetId"/></not></condition>
<widgets>
- <container>
- <link target="EditFixedAsset"
text="${uiLabelMap.AccountingNewFixedAsset}" style="buttontext"/>
- </container>
- <include-form name="ListFixedAssets"
location="component://accounting/webapp/accounting/fixedasset/FixedAssetForms.xml"/>
+ <include-menu name="FixedAssetTabBar"
location="component://accounting/widget/Menus.xml"/>
+ <label style="h1"
text="${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}:
${fixedAsset.fixedAssetName} [${uiLabelMap.CommonId}:${fixedAssetId}]
${${extraFunctionName}}"/>
</widgets>
</section>
- </container>
- </container>
+ </widgets>
+ <fail-widgets>
+ <label style="h3"
text="${uiLabelMap.AcccountingViewPermissionError}"/>
+ </fail-widgets>
+ </section>
+ <decorator-section-include name="body"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+
+ <!-- list all assets in a tabular format -->
+ <screen name="ListFixedAssets">
+ <section>
+ <actions>
+ <set field="titleProperty" value="AccountingFindFixedAssets"/>
+ <set field="tabButtonItem" value="ListFixedAssets"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
+ <decorator-section name="body">
+ <decorator-screen name="FindScreenDecorator"
location="component://common/widget/CommonScreens.xml">
+ <decorator-section name="menu-bar">
+ <section>
+ <condition>
+ <if-service-permission
service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
+ </condition>
+ <widgets>
+ <container style="button-bar"><link
target="EditFixedAsset" text="${uiLabelMap.AccountingNewFixedAsset}"
style="buttontext"/></container>
+ </widgets>
+ </section>
+ </decorator-section>
+ <decorator-section name="search-options">
+ <include-form name="FindFixedAssetOptions"
location="component://accounting/webapp/accounting/fixedasset/FixedAssetForms.xml"/>
+ </decorator-section>
+ <decorator-section name="search-results">
+ <include-screen
name="FixedAssetSearchResults"/>
+ </decorator-section>
+ </decorator-screen>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
-
+ <screen name="FixedAssetSearchResults">
+ <section>
+ <condition>
+ <if-service-permission
service-name="fixedAssetPermissionCheck" main-action="VIEW"/>
+ </condition>
+ <actions>
+ <property-map resource="AccountingUiLabels"
map-name="uiLabelMap" global="true"/>
+ <property-map resource="CommonUiLabels" map-name="uiLabelMap"
global="true"/>
+ </actions>
+ <widgets>
+ <include-form name="ListFixedAssets"
location="component://accounting/webapp/accounting/fixedasset/FixedAssetForms.xml"/>
+ </widgets>
+ </section>
+ </screen>
+
<!-- create and/or update a fixed asset -->
<screen name="EditFixedAsset">
<section>
@@ -70,7 +111,7 @@
<entity-one entity-name="FixedAsset" value-name="fixedAsset"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
@@ -113,7 +154,7 @@
</entity-condition>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
@@ -162,7 +203,7 @@
<script
location="component://accounting/webapp/accounting/fixedasset/month.bsh"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
@@ -204,7 +245,7 @@
<entity-one entity-name="FixedAsset" value-name="fixedAsset"
auto-field-map="true"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
@@ -252,7 +293,7 @@
<entity-one entity-name="FixedAsset" value-name="fixedAsset"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
@@ -299,7 +340,7 @@
<entity-one entity-name="FixedAsset" value-name="fixedAsset"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
@@ -346,7 +387,7 @@
<entity-one entity-name="FixedAsset" value-name="fixedAsset"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
@@ -466,7 +507,7 @@
<entity-one entity-name="FixedAsset" value-name="fixedAsset"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
@@ -554,7 +595,7 @@
<entity-one entity-name="PartyFixedAssetAssignment"
value-name="partyFixedAssetAssignment"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<container style="screenlet">
<container style="screenlet-title-bar">
@@ -601,7 +642,7 @@
<set field="assetNBVAfterDepreciation"
from-field="parameters.assetNBVAfterDepreciation"/>
</actions>
<widgets>
- <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CommonFixedAssetDecorator"
location="${parameters.fixedAssetDecoratorLocation}">
<decorator-section name="body">
<section>
<widgets>
@@ -628,4 +669,4 @@
</widgets>
</section>
</screen>
-</screens>
\ No newline at end of file
+</screens>