You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2009/06/21 10:22:19 UTC
svn commit: r786951 - in /ofbiz/trunk/applications:
accounting/webapp/accounting/WEB-INF/ accounting/widget/ workeffort/widget/
Author: hansbak
Date: Sun Jun 21 08:22:18 2009
New Revision: 786951
URL: http://svn.apache.org/viewvc?rev=786951&view=rev
Log:
make the changed calendar screens also working in the accounting component
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/web.xml
ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml
ofbiz/trunk/applications/accounting/widget/Menus.xml
ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml
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=786951&r1=786950&r2=786951&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Sun Jun 21 08:22:18 2009
@@ -986,17 +986,9 @@
<response name="success" type="view" value="LookupOrderHeader"/>
</request-map>
<!-- FixedAssetMaintenance Calendar -->
- <request-map uri="day">
+ <request-map uri="calendar">
<security https="true" auth="true"/>
- <response name="success" type="view" value="FixedAssetDay"/>
- </request-map>
- <request-map uri="week">
- <security https="true" auth="true"/>
- <response name="success" type="view" value="FixedAssetWeek"/>
- </request-map>
- <request-map uri="month">
- <security https="true" auth="true"/>
- <response name="success" type="view" value="FixedAssetMonth"/>
+ <response name="success" type="view" value="calendar"/>
</request-map>
<request-map uri="EditWorkEffort">
<security https="true" auth="true"/>
@@ -2120,9 +2112,7 @@
<view-map name="ListFixedAssetMaints" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#ListFixedAssetMaints"/>
<view-map name="EditFixedAssetMeters" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#EditFixedAssetMeters"/>
<view-map name="EditFixedAssetMaintOrders" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#EditFixedAssetMaintOrders"/>
- <view-map name="FixedAssetDay" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#CalendarDay"/>
- <view-map name="FixedAssetWeek" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#CalendarWeek"/>
- <view-map name="FixedAssetMonth" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#CalendarMonth"/>
+ <view-map name="calendar" type="screen" page="component://workeffort/widget/CalendarScreens.xml#CalendarWithDecorator"/>
<view-map name="WorkEffortSummary" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#WorkEffortSummary"/>
<!-- Depreciation Calculation -->
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/web.xml?rev=786951&r1=786950&r2=786951&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/web.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/web.xml Sun Jun 21 08:22:18 2009
@@ -45,6 +45,11 @@
<description>Configuration File(s) For The Service Dispatcher</description>
</context-param>
<context-param>
+ <param-name>fixedAssetDecoratorLocation</param-name>
+ <param-value>component://accounting/widget/CommonScreens.xml</param-value>
+ <description>The location of the CommonFixedAssetDecorator screen to use for this webapp.</description>
+ </context-param>
+ <context-param>
<param-name>mainDecoratorLocation</param-name>
<param-value>component://accounting/widget/CommonScreens.xml</param-value>
<description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
Modified: ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CommonScreens.xml?rev=786951&r1=786950&r2=786951&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Sun Jun 21 08:22:18 2009
@@ -285,4 +285,69 @@
</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="pre-body">
+ <section>
+ <condition>
+ <not><if-empty field="fixedAssetId"/></not>
+ </condition>
+ <widgets>
+ <include-menu name="FixedAssetTabBar" location="component://accounting/widget/Menus.xml"/>
+ </widgets>
+ </section>
+ <decorator-section-include name="pre-body"/>
+ </decorator-section>
+ <decorator-section name="body">
+ <section>
+ <condition>
+ <if-service-permission service-name="fixedAssetPermissionCheck" main-action="VIEW"/>
+ </condition>
+ <widgets>
+ <section>
+ <condition>
+ <not><if-empty field="fixedAssetId"/></not>
+ </condition>
+ <widgets>
+ <container style="h1"><label text="${uiLabelMap[titleProperty]} ${uiLabelMap.CommonFor} ${fixedAsset.fixedAssetName} [${fixedAssetId}] ${${extraFunctionName}}"/></container>
+ </widgets>
+ <fail-widgets>
+ <container style="h1"><label text="${uiLabelMap[titleProperty]}"/></container>
+ </fail-widgets>
+ </section>
+ <decorator-section-include name="body"/>
+ </widgets>
+ <fail-widgets>
+ <label style="h3" text="${uiLabelMap.AccountingViewPermissionError}"/>
+ </fail-widgets>
+ </section>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+
+ <screen name="CommonCalendarDecorator">
+ <section>
+ <actions>
+ <set field="tabButtonItem" value="ListFixedAssetCalendar"/>
+ <script location="component://accounting/webapp/accounting/WEB-INF/actions/fixedasset/ViewCalendar.groovy"/>
+ <entity-one entity-name="FixedAsset" value-field="fixedAsset"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonFixedAssetDecorator">
+ <decorator-section name="body">
+ <!--include-menu name="FixedAssetCalendarTabBar" location="component://accounting/widget/Menus.xml"/-->
+ <decorator-section-include name="body"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+
</screens>
Modified: ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml?rev=786951&r1=786950&r2=786951&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml Sun Jun 21 08:22:18 2009
@@ -21,53 +21,6 @@
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
- <screen name="CommonFixedAssetDecorator">
- <section>
- <actions>
- <set field="headerItem" value="ListFixedAssets"/>
- </actions>
- <widgets>
- <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="pre-body">
- <section>
- <condition>
- <not><if-empty field="fixedAssetId"/></not>
- </condition>
- <widgets>
- <include-menu name="FixedAssetTabBar" location="component://accounting/widget/Menus.xml"/>
- </widgets>
- </section>
- <decorator-section-include name="pre-body"/>
- </decorator-section>
- <decorator-section name="body">
- <section>
- <condition>
- <if-service-permission service-name="fixedAssetPermissionCheck" main-action="VIEW"/>
- </condition>
- <widgets>
- <section>
- <condition>
- <not><if-empty field="fixedAssetId"/></not>
- </condition>
- <widgets>
- <container style="h1"><label text="${uiLabelMap[titleProperty]} ${uiLabelMap.CommonFor} ${fixedAsset.fixedAssetName} [${fixedAssetId}] ${${extraFunctionName}}"/></container>
- </widgets>
- <fail-widgets>
- <container style="h1"><label text="${uiLabelMap[titleProperty]}"/></container>
- </fail-widgets>
- </section>
- <decorator-section-include name="body"/>
- </widgets>
- <fail-widgets>
- <label style="h3" text="${uiLabelMap.AccountingViewPermissionError}"/>
- </fail-widgets>
- </section>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
<!-- list all assets in a tabular format -->
<screen name="ListFixedAssets">
<section>
@@ -175,79 +128,6 @@
</section>
</screen>
- <!-- provide a calendar to show occupation-->
- <screen name="CommonCalendarDecorator">
- <section>
- <actions>
- <set field="tabButtonItem" value="ListFixedAssetCalendar"/>
- <script location="component://accounting/webapp/accounting/WEB-INF/actions/fixedasset/ViewCalendar.groovy"/>
- <entity-one entity-name="FixedAsset" value-field="fixedAsset"/>
- </actions>
- <widgets>
- <decorator-screen name="CommonFixedAssetDecorator" location="${parameters.fixedAssetDecoratorLocation}">
- <decorator-section name="body">
- <include-menu name="FixedAssetCalendarTabBar" location="component://accounting/widget/Menus.xml"/>
- <decorator-section-include name="body"/>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
- <screen name="CalendarDay">
- <section>
- <actions>
- <set field="titleProperty" value="PageTitleCalendarDay"/>
- <set field="parameters.viewMode" value="D"/>
- </actions>
- <widgets>
- <decorator-screen name="CommonCalendarDecorator">
- <decorator-section name="body">
- <platform-specific>
- <html><html-template location="component://workeffort/webapp/workeffort/calendar/day.ftl"/></html>
- </platform-specific>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
- <screen name="CalendarWeek">
- <section>
- <actions>
- <set field="titleProperty" value="PageTitleCalendarWeek"/>
- <set field="parameters.viewMode" value="W"/>
- </actions>
- <widgets>
- <decorator-screen name="CommonCalendarDecorator">
- <decorator-section name="body">
- <platform-specific>
- <html><html-template location="component://workeffort/webapp/workeffort/calendar/week.ftl"/></html>
- </platform-specific>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
- <screen name="CalendarMonth">
- <section>
- <actions>
- <set field="titleProperty" value="PageTitleCalendarMonth"/>
- <set field="parameters.viewMode" value="M"/>
- </actions>
- <widgets>
- <decorator-screen name="CommonCalendarDecorator">
- <decorator-section name="body">
- <platform-specific>
- <html><html-template location="component://workeffort/webapp/workeffort/calendar/month.ftl"/></html>
- </platform-specific>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
<screen name="WorkEffortSummary">
<section>
<actions>
Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=786951&r1=786950&r2=786951&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/Menus.xml Sun Jun 21 08:22:18 2009
@@ -488,7 +488,7 @@
</link>
</menu-item>
<menu-item name="ListFixedAssetCalendar" title="${uiLabelMap.AccountingFixedAssetCalendar}">
- <link target="month">
+ <link target="calendar">
<parameter param-name="fixedAssetId"/>
</link>
</menu-item>
@@ -534,25 +534,6 @@
</menu-item>
</menu>
- <menu name="FixedAssetCalendarTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
- selected-menuitem-context-field-name="parameters.viewMode">
- <menu-item name="D" title="${uiLabelMap.CommonDay}">
- <link target="day">
- <parameter param-name="fixedAssetId"/>
- </link>
- </menu-item>
- <menu-item name="W" title="${uiLabelMap.CommonWeek}">
- <link target="week">
- <parameter param-name="fixedAssetId"/>
- </link>
- </menu-item>
- <menu-item name="M" title="${uiLabelMap.CommonMonth}">
- <link target="month">
- <parameter param-name="fixedAssetId"/>
- </link>
- </menu-item>
- </menu>
-
<menu name="FinAccountTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
default-menu-item-name="EditFinAccount">
<menu-item name="EditFinAccount" title="${uiLabelMap.AccountingFinAccount}">
Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml?rev=786951&r1=786950&r2=786951&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml Sun Jun 21 08:22:18 2009
@@ -146,35 +146,35 @@
</menu>
<menu name="Day" extends="Calendar">
<menu-item name="next" title="${uiLabelMap.WorkEffortNextDay}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=day&start=${nextMillis}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=day&start=${nextMillis}&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
<menu-item name="toDay" title="${uiLabelMap.CommonToday}">
- <link target="${parameters._LAST_VIEW_NAME_}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?paeriod=day&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
<menu-item name="prev" title="${uiLabelMap.WorkEffortPreviousDay}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=day&start=${prevMillis}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=day&start=${prevMillis}&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
</menu>
<menu name="Week" extends="Calendar">
<menu-item name="next" title="${uiLabelMap.WorkEffortNextWeek}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=week&start=${nextMillis}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=week&start=${nextMillis}&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
<menu-item name="thisWeek" title="${uiLabelMap.WorkEffortThisWeek}">
- <link target="week"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=week&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
<menu-item name="prev" title="${uiLabelMap.WorkEffortPreviousWeek}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=week&start=${prevMillis}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=week&start=${prevMillis}&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
</menu>
<menu name="Month" extends="Calendar">
<menu-item name="next" title="${uiLabelMap.WorkEffortNextMonth}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=month&start=${nextMillis}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=month&start=${nextMillis}&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
<menu-item name="thisMonth" title="${uiLabelMap.WorkEffortThisMonth}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=month"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=month&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
<menu-item name="prev" title="${uiLabelMap.WorkEffortPreviousMonth}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=month&start=${prevMillis}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=month&start=${prevMillis}&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
</menu>
<menu name="Upcoming" extends="Calendar">
@@ -182,21 +182,24 @@
<menu name="Calendar">
<menu-item name="upcoming" title="${uiLabelMap.WorkEffortUpcomingEvents}">
<condition>
- <if-compare field="parameters.period" operator="not-equals" value="upcoming"/>
+ <and>
+ <if-compare field="parameters.period" operator="not-equals" value="upcoming"/>
+ <if-empty field="parameters.fixedAssetId"/>
+ </and>
</condition>
- <link target="${parameters._LAST_VIEW_NAME_}?period=upcoming"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=upcoming&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
<menu-item name="month" title="${uiLabelMap.WorkEffortMonthView}">
<condition>
<if-compare field="parameters.period" operator="not-equals" value="month"/>
</condition>
- <link target="${parameters._LAST_VIEW_NAME_}?period=month"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=month&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
<menu-item name="week" title="${uiLabelMap.WorkEffortWeekView}">
<condition>
<if-compare field="parameters.period" operator="not-equals" value="week"/>
</condition>
- <link target="${parameters._LAST_VIEW_NAME_}?period=week"/>
+ <link target="${parameters._LAST_VIEW_NAME_}?period=week&fixedAssetId=${parameters.fixedAssetId}"/>
</menu-item>
<menu-item name="day" title="${uiLabelMap.WorkEffortDayView}">
<condition>