svn commit: r749560 - in /ofbiz/trunk: applications/order/config/ applications/order/entitydef/ applications/order/widget/ordermgr/ specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/ specialpurpose/projectmgr/widget/ specialpurpose/projectmgr/widget/...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r749560 - in /ofbiz/trunk: applications/order/config/ applications/order/entitydef/ applications/order/widget/ordermgr/ specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/ specialpurpose/projectmgr/widget/ specialpurpose/projectmgr/widget/...

hansbak-2
Author: hansbak
Date: Tue Mar  3 08:07:35 2009
New Revision: 749560

URL: http://svn.apache.org/viewvc?rev=749560&view=rev
Log:
be able to relate a project to an order (order component is not dependant on project manager)

Modified:
    ofbiz/trunk/applications/order/config/OrderUiLabels.xml
    ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
    ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml

Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderUiLabels.xml?rev=749560&r1=749559&r2=749560&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/config/OrderUiLabels.xml (original)
+++ ofbiz/trunk/applications/order/config/OrderUiLabels.xml Tue Mar  3 08:07:35 2009
@@ -9990,6 +9990,13 @@
         <value xml:lang="th">แสดงบัตร</value>
         <value xml:lang="zh">显示购物车</value>
     </property>
+    <property key="PageTitleProjectInformation">
+        <value xml:lang="en">Project Information</value>
+        <value xml:lang="fr">Informations du projet</value>
+        <value xml:lang="it">Informazione progetto</value>
+        <value xml:lang="th">ข้อมูลโปรเจค</value>
+        <value xml:lang="zh">项目信息</value>
+    </property>
     <property key="PageTitleRequestItemNotes">
         <value xml:lang="de">Anfrageelement Anmerkungen</value>
         <value xml:lang="en">Request Item Notes</value>
@@ -10130,4 +10137,26 @@
         <value xml:lang="th">แสดงการร้องขอ</value>
         <value xml:lang="zh">浏览请求</value>
     </property>
+    <property key="ProjectMgrActualHours">
+        <value xml:lang="en">Actual Hours</value>
+        <value xml:lang="fr">Heures réelles</value>
+        <value xml:lang="it">Ore attuali</value>
+        <value xml:lang="th">ชั่วโมงจริง</value>
+        <value xml:lang="zh">实际工时</value>
+    </property>
+    <property key="ProjectMgrPlannedHours">
+        <value xml:lang="en">Planned Hours</value>
+        <value xml:lang="fr">Heures planifiées</value>
+        <value xml:lang="it">Ore pianificate</value>
+        <value xml:lang="th">ชั่วโมงที่วางแผน</value>
+        <value xml:lang="zh">已计划工时</value>
+    </property>
+    <property key="ProjectMgrProjectName">
+        <value xml:lang="en">Project Name</value>
+        <value xml:lang="fr">Nom du projet</value>
+        <value xml:lang="it">Nome progetto</value>
+        <value xml:lang="th">ชื่อโปรเจค</value>
+        <value xml:lang="zh">项目名称</value>
+    </property>
+    
 </resource>

Modified: ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?rev=749560&r1=749559&r2=749560&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Tue Mar  3 08:07:35 2009
@@ -1561,5 +1561,19 @@
       </relation>
     </view-entity>
 
+  <view-entity entity-name="OrderHeaderAndWorkEffort" package-name="org.ofbiz.workEffort.workeffort" title="Order Header And Work Effort View Entity">
+    <member-entity entity-alias="WE" entity-name="WorkEffort"/>
+    <member-entity entity-alias="OH" entity-name="OrderHeader"/>
+    <member-entity entity-alias="OHWE" entity-name="OrderHeaderWorkEffort"/>
+    <alias-all entity-alias="WE"/>
+    <alias-all entity-alias="OH"/>
+    <alias-all entity-alias="OHWE"/>
+    <view-link entity-alias="WE" rel-entity-alias="OHWE">
+      <key-map field-name="workEffortId"/>
+    </view-link>
+    <view-link entity-alias="OHWE" rel-entity-alias="OH">
+      <key-map field-name="orderId"/>
+    </view-link>
+  </view-entity>
 </entitymodel>
 

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml?rev=749560&r1=749559&r2=749560&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Tue Mar  3 08:07:35 2009
@@ -70,6 +70,7 @@
                     <include-screen name="orderinfo"/>
                     <include-screen name="orderterms"/>
                     <include-screen name="orderpaymentinfo"/>
+                    <include-screen name="projectAssoOrder"/>
                 </container>
                 <container style="righthalf">
                     <include-screen name="ordercontactinfo"/>
@@ -108,6 +109,36 @@
             </widgets>
         </section>
     </screen>
+    <screen name="projectAssoOrder">
+        <section>
+            <condition>
+                <if-has-permission permission="PROJECTMGR" action="_VIEW"/>
+            </condition>
+            <actions>
+            <set field="orderId" from-field="parameters.orderId"/>
+            <entity-and entity-name="OrderHeaderAndWorkEffort" list="listProjectAssoOrder">
+                <field-map field-name="orderId" from-field="orderId"/>
+                <field-map field-name="workEffortTypeId" value="PROJECT"/>
+            </entity-and>
+            </actions>
+            <widgets>
+                <section>
+                    <condition>
+                        <not>                                            
+                            <if-empty field="listProjectAssoOrder"/>                                                
+                        </not>                                        
+                    </condition>
+                    <widgets>
+                        <screenlet title="${uiLabelMap.PageTitleProjectInformation}">
+                            <include-form name="projectAssoOrder" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
+                        </screenlet>
+                    </widgets>
+                    <fail-widgets></fail-widgets>
+                </section>
+            </widgets>
+            <fail-widgets></fail-widgets>
+        </section>
+    </screen>
     <screen name="ordercontactinfo">
         <section>
             <widgets>

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml?rev=749560&r1=749559&r2=749560&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Tue Mar  3 08:07:35 2009
@@ -145,6 +145,20 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditProjectTasks"/>
     </request-map>
+    <request-map uri="linkProjectOrder">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createOrderHeaderWorkEffort"/>
+        <response name="success" type="view" value="EditProjectOrders"/>
+    </request-map>
+    <request-map uri="unLinkProjectOrder">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteOrderHeaderWorkEffort"/>
+        <response name="success" type="view" value="EditProjectOrders"/>
+    </request-map>
+    <request-map uri="EditProjectOrders">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditProjectOrders"/>
+    </request-map>
     <request-map uri="EditTask">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditTask"/>
@@ -856,6 +870,7 @@
     <view-map name="ChildWorkEfforts" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#ChildWorkEfforts"/>
     <view-map name="EditProjectAndAssoc" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditProjectAndAssoc"/>
     <view-map name="EditProjectTasks" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditProjectTasks"/>
+    <view-map name="EditProjectOrders" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditProjectOrders"/>
     <view-map name="MyTasks" type="screen" page="component://projectmgr/widget/TaskScreens.xml#MyTasks"/>
     <view-map name="FindTask" type="screen" page="component://projectmgr/widget/TaskScreens.xml#FindTask"/>
     <view-map name="EditTask" type="screen" page="component://projectmgr/widget/TaskScreens.xml#EditTask"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=749560&r1=749559&r2=749560&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Tue Mar  3 08:07:35 2009
@@ -121,7 +121,19 @@
                 </and>
             </condition>
             <link target="EditProjectTasks?projectId=${projectId}"/>
-        </menu-item>        
+        </menu-item>    
+        <menu-item name="orders" title="${uiLabelMap.Orders}">
+            <condition>
+                <and>
+                    <if-compare field="hasUpdatePermission" operator="equals" value="true"/>
+                    <if-compare field="project.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/>
+                    <if-compare field="project.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/>
+                    <if-compare field="project.currentStatusId" operator="not-equals" value="PTS_CANCELED"/>
+                    <if-compare field="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/>
+                </and>
+            </condition>
+            <link target="EditProjectOrders?projectId=${projectId}"/>
+        </menu-item>    
         <menu-item name="parties" title="${uiLabelMap.ProjectMgrResources}">
             <condition>
                 <and>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=749560&r1=749559&r2=749560&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Tue Mar  3 08:07:35 2009
@@ -286,7 +286,49 @@
                 </decorator-screen>
             </widgets>
         </section>
-    </screen>        
+    </screen>      
+    <screen name="projectAssoOrder">
+        <section>
+            <actions>
+                <set field="orderId" from-field="parameters.orderId"/>
+                <entity-and entity-name="WorkEffortOrderHeaderView" list="listProjectAssoOrder">
+                    <field-map field-name="orderId" from-field="orderId"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.PageTitleProjectInformation}">
+                    <include-form name="projectAssoOrder" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EditProjectOrders">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditProjectOrder"/>
+                <set field="tabButtonItem" value="orders"/>
+                <set field="headerItem" value="editProjectOrders"/>
+                <set field="labelTitleProperty" value="PageTitleListOrder"/>                
+                <set field="projectId" from-field="parameters.projectId"/>
+                <entity-and entity-name="WorkEffortOrderHeaderView" list="listOrderAssoProject">
+                    <field-map field-name="workEffortId" from-field="projectId"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.OrderFindOrder}">
+                            <include-form name="FindOrders" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
+                        </screenlet>
+                        <screenlet title="List Order">
+                            <include-form name="ListOrderInfo" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+               </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+        
     <screen name="EditTask">
         <section>
             <actions>
@@ -505,6 +547,7 @@
                            <include-screen name="PartiesInfo"/>
                            <include-screen name="NoteInfo"/>
                            <include-screen name="ListProjectContent"/>
+                            <include-screen name="OrderInfo"/>
                         </container>
                     </decorator-section>
                 </decorator-screen>
@@ -590,6 +633,22 @@
             </widgets>
         </section>
     </screen>
+    <screen name="OrderInfo">
+        <section>
+            <actions>
+                <set field="projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
+                <set field="headerItem" value="orderInfo"/>
+                <entity-and entity-name="WorkEffortOrderHeaderView" list="listOrderAssoProject">
+                    <field-map field-name="workEffortId" from-field="projectId"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <screenlet title="List Order">
+                    <include-form name="ListOrderInfo" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
     <screen name="PartiesInfo">
         <section>
             <actions>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=749560&r1=749559&r2=749560&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Tue Mar  3 08:07:35 2009
@@ -351,6 +351,32 @@
         <field name="plannedHours"><display/></field>
         <field name="actualHours"><display/></field>
     </form>
+    <form name="FindOrders" target="linkProjectOrder?projectId=${projectId}" type="single" title="Find and List Orders"
+        header-row-style="header-row" default-table-style="basic-table">
+        <field name="orderId"><lookup target-form-name="/ordermgr/control/LookupOrderHeader"/></field>
+        <field name="workEffortId"><hidden value="${projectId}"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    <form name="ListOrderInfo" target="EditProjectOrders?projectId=${projectId}" type="list" list-name="listOrderAssoProject" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <field name="orderId"><hyperlink target="/ordermgr/control/orderview?orderId=${orderId}" target-type="inter-app" description="${orderId}"/></field>
+        <field name="orderName"><display/></field>
+        <field name="orderTypeId"><display-entity entity-name="OrderType" description="${description}"/></field>
+        <field name="statusId"><display-entity entity-name="StatusItem" description="${description}"/></field>
+        <field name="orderDate"><display/></field>
+        <field name="entryDate"><display/></field>
+        <field name="linkProjectOrder" title=" " widget-style="buttontext" use-when="headerItem.equals(&quot;editProjectOrders&quot;)"><hyperlink target="unLinkProjectOrder?workEffortId=${projectId}&amp;orderId=${orderId}&amp;projectId=${projectId}" description="Remove Link From The Project"/></field>
+    </form>
+    <form name="projectAssoOrder"  type="list" list-name="listProjectAssoOrder"
+        extends="ListProjects" extends-resource="component://projectmgr/widget/forms/ProjectForms.xml">
+        <row-actions>
+            <service service-name="getProject" result-map="resultProject">
+                <field-map field-name="projectId" value="${workEffortId}"/>
+            </service>
+        </row-actions>
+        <field name="projectName" map-name="resultProject.projectInfo" title="${uiLabelMap.ProjectMgrProjectName}" widget-style="buttontext">
+            <hyperlink description="${resultProject.projectInfo.projectName}" target-type="inter-app" target="/projectmgr/control/projectView?projectId=${resultProject.projectInfo.projectId}"/>
+        </field>
+    </form>
     <form name="ListProjectProviderParties" type="list" list-name="assigns"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>