svn commit: r604418 - in /ofbiz/trunk/specialpurpose/projectmgr: script/org/ofbiz/project/ servicedef/ webapp/projectmgr/WEB-INF/ webapp/projectmgr/project/ widget/

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

svn commit: r604418 - in /ofbiz/trunk/specialpurpose/projectmgr: script/org/ofbiz/project/ servicedef/ webapp/projectmgr/WEB-INF/ webapp/projectmgr/project/ widget/

hansbak-2
Author: hansbak
Date: Sat Dec 15 02:29:13 2007
New Revision: 604418

URL: http://svn.apache.org/viewvc?rev=604418&view=rev
Log:
show project name at the task level and rename screen to be more meaningful

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml
    ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl
    ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml

Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml?rev=604418&r1=604417&r2=604418&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Sat Dec 15 02:29:13 2007
@@ -88,15 +88,36 @@
         
     </simple-method>          
 
-    <simple-method method-name="getProject" short-description="get Project information" login-required="true">
-        <!-- get the phase seq id -->
-        <if-empty field-name="parameters.projectId">
-            <return/>
+    <simple-method method-name="getProjectIdAndName" short-description="Get the projectId when a phase or task is provided." login-required="true">
+        <if-empty field-name="parameters.taskId">
+            <if-empty field-name="parameters.phaseId">
+                <return/>
+            </if-empty>
         </if-empty>
-        <entity-one entity-name="WorkEffort" value-name="project">
-            <field-map field-name="workEffortId" env-name="parameters.projectId"/>
-        </entity-one>
-        <set field="highInfo.projectId" from-field="project.workEffortId"/>
+        <if-not-empty field-name="parameters.taskId">
+            <entity-one entity-name="WorkEffort" value-name="task">
+                <field-map field-name="workEffortId" env-name="parameters.taskId"/>
+            </entity-one>
+            <get-related-one value-name="task" relation-name="ParentWorkEffort" to-value-name="phase"/>
+            <else>
+                <entity-one entity-name="WorkEffort" value-name="phase">
+                    <field-map field-name="workEffortId" env-name="parameters.phaseId"/>
+                </entity-one>
+            </else>
+        </if-not-empty>
+        <get-related-one value-name="phase" relation-name="ParentWorkEffort" to-value-name="project"/>
+        <field-to-result field-name="project.workEffortId" result-name="projectId"/>
+        <field-to-result field-name="project.workEffortName" result-name="projectName"/>
+    </simple-method>
+    
+    <simple-method method-name="getProject" short-description="get Project information" login-required="true">
+            <if-empty field-name="parameters.projectId">
+                <return/>
+            </if-empty>
+            <entity-one entity-name="WorkEffort" value-name="project">
+                <field-map field-name="workEffortId" env-name="parameters.projectId"/>
+            </entity-one>
+            <set field="highInfo.projectId" from-field="project.workEffortId"/>
         <set field="highInfo.projectName" from-field="project.workEffortName"/>
         <set field="highInfo.projectDescription" from-field="project.description"/>
         <set field="highInfo.currentStatusId" from-field="project.currentStatusId"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml?rev=604418&r1=604417&r2=604418&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Sat Dec 15 02:29:13 2007
@@ -43,6 +43,15 @@
         <attribute name="projectInfo" type="java.util.Map" mode="OUT" optional="true"/>
     </service>
     
+    <service name="getProjectIdAndName" engine="simple"
+        location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectIdAndName">
+        <description>Get the projectId and Name when a phase or task is provided.</description>
+        <attribute name="taskId" type="String" mode="IN" optional="true"/>
+        <attribute name="phaseId" type="String" mode="IN" optional="true"/>
+        <attribute name="projectId" type="String" mode="OUT" optional="true"/>
+        <attribute name="projectName" type="String" mode="OUT" optional="true"/>
+    </service>
+    
     <service name="getProjectPhaseList" engine="simple"
         location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectPhaseList">
         <description>Get project phase information and related task info.</description>

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=604418&r1=604417&r2=604418&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Sat Dec 15 02:29:13 2007
@@ -447,6 +447,6 @@
     <view-map name="EditPartySkills" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditPartySkills"/>
     <view-map name="EditWorkEffortNotes" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditProjectNotes"/>
     <view-map name="EditTaskNotes" type="screen" page="component://projectmgr/widget/TaskScreens.xml#EditTaskNotes"/>
-    <view-map name="taskView" type="screen" page="component://projectmgr/widget/TaskScreens.xml#TaskSummary"/>
+    <view-map name="taskView" type="screen" page="component://projectmgr/widget/TaskScreens.xml#TaskView"/>
     <!-- end of view mappings -->
 </site-conf>

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl?rev=604418&r1=604417&r2=604418&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl Sat Dec 15 02:29:13 2007
@@ -298,6 +298,6 @@
 <#if tasks?has_content>
 <br/><br/><br/><br/><br/><br/>
  <#list tasks as taskNode>
- <br/><br/>
+ <br/>
  </#list>
 </#if>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml?rev=604418&r1=604417&r2=604418&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml Sat Dec 15 02:29:13 2007
@@ -120,7 +120,12 @@
     <screen name="CommonTaskDecorator">
         <section>
             <actions>
-                <entity-one entity-name="WorkEffort" value-name="workEffort"/>
+                <entity-one entity-name="WorkEffort" value-name="workEffort"/>
+                <service service-name="getProjectIdAndName" result-map-name="result">
+                    <field-map field-name="taskId" env-name="parameters.workEffortId"/>
+                </service>
+                <set field="projectId" from-field="result.projectId"/>
+                <set field="projectName" from-field="result.projectId"/>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
@@ -139,6 +144,7 @@
                                     <widgets>                                        
                                         <include-menu name="TaskTabBar" location="component://projectmgr/widget/Menus.xml"/>
                                         <label style="head1" text="${uiLabelMap.ProjectMgrTaskCurrent}: ${workEffort.workEffortName}[${workEffort.workEffortId}] Project: ${projectName}"/>
+                                        <link style="head1" text="[${projectId}]" target="projectView?projectId=${projectId}"/>
                                     </widgets>                                    
                                 </section>
                                 <decorator-section-include name="body"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=604418&r1=604417&r2=604418&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Sat Dec 15 02:29:13 2007
@@ -273,7 +273,7 @@
             </widgets>
         </section>
     </screen>
-    <screen name="TaskSummary">        
+    <screen name="TaskView">        
         <section>
             <actions>
                 <set field="tabButtonItem" value="taskView"/>