svn commit: r684615 - in /ofbiz/trunk/specialpurpose/projectmgr: webapp/projectmgr/WEB-INF/controller.xml widget/CommonScreens.xml widget/Menus.xml widget/TaskScreens.xml widget/forms/RequestForms.xml widget/forms/TaskForms.xml

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

svn commit: r684615 - in /ofbiz/trunk/specialpurpose/projectmgr: webapp/projectmgr/WEB-INF/controller.xml widget/CommonScreens.xml widget/Menus.xml widget/TaskScreens.xml widget/forms/RequestForms.xml widget/forms/TaskForms.xml

hansbak-2
Author: hansbak
Date: Sun Aug 10 16:53:34 2008
New Revision: 684615

URL: http://svn.apache.org/viewvc?rev=684615&view=rev
Log:
add the possibility to add a project at the top level, rename to more usefull names, screenlet conversion

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml

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=684615&r1=684614&r2=684615&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Sun Aug 10 16:53:34 2008
@@ -143,6 +143,10 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditTask"/>
     </request-map>
+    <request-map uri="addProjectTask">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="AddProjectTask"/>
+    </request-map>
     <request-map uri="EditTaskPartyAssigns">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditTaskPartyAssigns"/>
@@ -200,6 +204,12 @@
         <response name="success" type="view" value="EditProjectTasks"/>
         <response name="error" type="view" value="EditProjectTasks"/>
     </request-map>
+    <request-map uri="createProjectTask">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createProjectTask"/>
+        <response name="success" type="view" value="taskView"/>
+        <response name="error" type="view" value="AddProjectTask"/>
+    </request-map>
     <request-map uri="createProjectPhase">
         <security https="true" auth="true"/>
         <event type="service" invoke="createWorkEffort"/>
@@ -539,15 +549,15 @@
         <response name="success" type="view" value="Timesheet"/>
         <response name="error" type="view" value="Timesheet"/>
     </request-map>
-    <request-map uri="CreateTaskbyRequest">
+    <request-map uri="EditTaskFromRequest">
         <security https="true" auth="true"/>
-        <response name="success" type="view" value="CreateTaskbyRequest"/>
+        <response name="success" type="view" value="EditTaskFromRequest"/>
     </request-map>
-    <request-map uri="CreateTaskbyRequests">
+    <request-map uri="CreateTaskFromRequest">
         <security https="true" auth="true"/>
         <event type="service" invoke="createWorkEffort"/>
         <response name="success" type="request" value="updaterequeststatus"/>
-        <response name="error" type="view" value="CreateTaskbyRequest"/>
+        <response name="error" type="view" value="EditTaskFromRequest"/>
     </request-map>
     <request-map uri="newrequest">
         <security https="true" auth="true"/>
@@ -800,6 +810,7 @@
     <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"/>
+    <view-map name="AddProjectTask" type="screen" page="component://projectmgr/widget/TaskScreens.xml#AddProjectTask"/>
     <view-map name="AddTaskAndAssoc" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#AddTaskAndAssoc"/>
     <view-map name="EditTaskAndAssoc" type="screen" page="component://projectmgr/widget/TaskScreens.xml#EditTaskAndAssoc"/>
     <view-map name="Dependencies" type="screen" page="component://projectmgr/widget/TaskScreens.xml#Dependencies"/>
@@ -826,7 +837,7 @@
     <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#TaskView"/>
     <view-map name="Timesheet" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#Timesheet"/>
-    <view-map name="CreateTaskbyRequest" type="screen" page="component://projectmgr/widget/TaskScreens.xml#CreateTaskbyRequest"/>
+    <view-map name="EditTaskFromRequest" type="screen" page="component://projectmgr/widget/TaskScreens.xml#EditTaskFromRequest"/>
     <view-map name="RequestList" type="screen" page="component://projectmgr/widget/RequestScreens.xml#RequestList"/>
     <view-map name="EditRequest" type="screen" page="component://projectmgr/widget/RequestScreens.xml#EditRequest"/>
     <view-map name="ViewRequest" type="screen" page="component://projectmgr/widget/RequestScreens.xml#ViewRequest"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml?rev=684615&r1=684614&r2=684615&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml Sun Aug 10 16:53:34 2008
@@ -135,27 +135,15 @@
                             <widgets>
                                 <section>
                                     <condition>
-                                        <not>
-                                            <if-empty field-name="workEffort"/>
-                                        </not>
+                                        <not><if-empty field-name="workEffort"/></not>
                                     </condition>
                                     <widgets>                                        
                                         <include-menu name="TaskTabBar" location="component://projectmgr/widget/Menus.xml"/>
-                                        <section>
-                                            <condition>
-                                                <or>
-                                                    <if-compare field-name="tabButtonItem" operator="equals" value="taskView"/>
-                                                    <if-compare field-name="tabButtonItem" operator="equals" value="edittask"/>
-                                                </or>
-                                            </condition>
-                                            <widgets>
-                                                <include-menu name="TaskSubTabBar" location="component://projectmgr/widget/Menus.xml"/>
-                                            </widgets>
-                                        </section>
                                         <label style="h1" text="${uiLabelMap.ProjectMgrTaskCurrent}: ${workEffort.workEffortName}[${workEffort.workEffortId}] Project: ${projectName}"/>
                                         <link style="h1" text="[${projectId}]" target="projectView?projectId=${projectId}"/>
                                     </widgets>                                    
                                 </section>
+                                <include-menu name="TaskSubTabBar" location="component://projectmgr/widget/Menus.xml"/>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=684615&r1=684614&r2=684615&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Sun Aug 10 16:53:34 2008
@@ -218,7 +218,12 @@
         </menu-item>
     </menu>
     <menu name="TaskTabBar" type="simple" menu-container-style="button-bar tab-bar" default-selected-style="selected" selected-menuitem-context-field-name="tabButtonItem">
-        <menu-item name="taskView" title="${uiLabelMap.ProjectMgrTaskSummary}"><link target="taskView?workEffortId=${workEffortId}"/></menu-item>
+        <menu-item name="taskView" title="${uiLabelMap.ProjectMgrTaskSummary}">
+            <condition>
+               <not><if-empty field-name="workEffort"/></not>
+            </condition>
+            <link target="taskView?workEffortId=${workEffortId}"/>
+        </menu-item>
         <menu-item name="edittask" title="${uiLabelMap.ProjectMgrEditTask}">
             <condition>
                 <and>
@@ -275,10 +280,16 @@
             <link target="EditTimeEntries?workEffortId=${workEffortId}"/>
         </menu-item>
         <menu-item name="notes" title="${uiLabelMap.CommonNotes}">
+            <condition>
+                <not><if-empty field-name="workEffort"/></not>
+            </condition>
             <link target="EditTaskNotes?workEffortId=${workEffortId}"/>
         </menu-item>
     </menu>
     <menu name="TaskSubTabBar" menu-container-style="button-bar button-style-2" default-selected-style="selected">  
+        <menu-item name="new" title="${uiLabelMap.CommonNew}" >
+            <link target="addProjectTask"/>
+        </menu-item>
         <menu-item name="setonhold" title="${uiLabelMap.ProjectMgrSetOnHold}" >
             <condition>
                 <and>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=684615&r1=684614&r2=684615&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Sun Aug 10 16:53:34 2008
@@ -188,7 +188,7 @@
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/>
             </actions>                                                
             <widgets>  
-                <decorator-screen name="CommonMyTaskDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">                                                                                                                
                         <screenlet  title="${uiLabelMap.PageTitleFindTask}" collapsible="true" id="findTask">
                             <include-form name="FindTask" location="component://projectmgr/widget/forms/TaskForms.xml"/>
@@ -248,20 +248,9 @@
                         <section>                                                      
                             <!-- To add a new Project -->
                             <widgets>
-                                <container style="screenlet">
-                                    <container style="screenlet-title-bar">
-                                        <container style="h3">
-                                            <label text="${uiLabelMap.PageTitleEditTask} #${task.workEffortId} ${uiLabelMap.CommonInformation}"/>
-                                        </container>
-                                    </container>
-                                    <container style="screenlet-body">
-                                        <section>
-                                            <widgets>    
-                                                <include-form name="EditTask" location="component://projectmgr/widget/forms/TaskForms.xml"/>
-                                            </widgets>
-                                        </section>
-                                    </container>
-                                </container>
+                                <screenlet title="${uiLabelMap.PageTitleEditTask} #${task.workEffortId} ${uiLabelMap.CommonInformation}">
+                                    <include-form name="EditTask" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                                </screenlet>
                             </widgets>                            
                         </section>
                     </decorator-section>
@@ -269,6 +258,25 @@
             </widgets>
         </section>
     </screen>
+    <screen name="AddProjectTask">
+        <section>
+            <actions>
+                <set field="headerItem" value="task"/>
+                <set field="titleProperty" value="PageTitleEditTask"/>
+                <set field="tabButtonItem" value="edittask"/>                
+                <set field="labelTitleProperty" value="PageTitleEditTaskList"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                         <screenlet title="${uiLabelMap.PageTitleEditTask} #${task.workEffortId} ${uiLabelMap.CommonInformation}">
+                             <include-form name="AddProjectTask" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                         </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="EditTaskListAndAssoc">
         <section>
             <actions>
@@ -651,7 +659,7 @@
             </widgets>
         </section>
     </screen>                  
-    <screen name="CreateTaskbyRequest">
+    <screen name="EditTaskFromRequest">
         <section>
             <actions>
                 <set field="titleProperty" value="PageTitleEditTaskList"/>
@@ -678,7 +686,7 @@
                                         <container style="screenlet-body">
                                             <section>
                                                 <widgets>    
-                                                    <include-form name="createTaskbyRequest" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                                                    <include-form name="EditTaskFromRequest" location="component://projectmgr/widget/forms/TaskForms.xml"/>
                                                 </widgets>
                                             </section>
                                         </container>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml?rev=684615&r1=684614&r2=684615&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml Sun Aug 10 16:53:34 2008
@@ -23,7 +23,7 @@
     <form name="ListRequests" type="list"
         extends="ListRequests" extends-resource="component://order/webapp/ordermgr/request/RequestForms.xml">
         <field name="createTaskFromRequest" title="${uiLabelMap.ProjectMgrCreateTaskFromRequest}" widget-style="buttontext">
-            <hyperlink description="${uiLabelMap.ProjectMgrCreateTaskFromRequest}" target="CreateTaskbyRequest?custRequestId=${custRequestId}"/>
+            <hyperlink description="${uiLabelMap.ProjectMgrCreateTaskFromRequest}" target="EditTaskFromRequest?custRequestId=${custRequestId}"/>
         </field>
     </form>
     <form name="EditCustRequest" type="single" target="updaterequest" title="Request" default-map-name="custRequest"

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=684615&r1=684614&r2=684615&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Sun Aug 10 16:53:34 2008
@@ -95,14 +95,13 @@
         <field name="estimatedCompletionDate" title="${uiLabelMap.FormFieldTitle_estimatedCompletionDate}" position="2"><date-time type="date"/></field>
         <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field>
     </form>
-    <form name="AddProjectTask" type="single" target="createProjectTaskOrPhase"
+    <form name="AddProjectTask" type="single" target="createProjectTask"
         header-row-style="header-row" default-table-style="basic-table">
-        <field name="projectId"><hidden value="${parameters.projectId}"/></field>
         <field name="workEffortTypeId"><hidden value="TASK"/></field>
         <field name="currentStatusId"><hidden value="PTS_CREATED"/></field>
         <field name="taskName" parameter-name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}*" tooltip="${uiLabelMap.CommonRequired}"><text/></field>
         <field name="taskDescription" parameter-name="description" title="${uiLabelMap.CommonDescription}"><text/></field>
-        <field name="phaseName" parameter-name="workEffortParentId" title="${uiLabelMap.ProjectMgrTaskPhase}">
+        <field name="phaseName" use-when="projectId!=void" parameter-name="workEffortParentId" title="${uiLabelMap.ProjectMgrTaskPhase}">
             <drop-down allow-empty="false">
                 <entity-options entity-name="WorkEffort" key-field-name="workEffortId" description="${workEffortName}">
                     <entity-constraint name="workEffortTypeId" value="PHASE"/>
@@ -111,6 +110,13 @@
                 </entity-options>        
             </drop-down>
         </field>
+        <field name="workEffortParentId" title="${uiLabelMap.ProjectMgrProjectAndPhaseName}*" parameter-name="workEffortParentId" required-field="true" tooltip="${uiLabelMap.CommonRequired}">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="ProjectAndPhaseAndTask" description="${projectName} : ${phaseName}">    
+                    <entity-order-by field-name="workEffortParentId"/>
+                    </entity-options>
+                </drop-down>
+            </field>
         <field name="estimatedHours" title="${uiLabelMap.ProjectMgrEstimatedHours}"><text size="5"/></field>
         <field name="skillTypeId" title="${uiLabelMap.HumanResSkillTypeId}">
             <drop-down allow-empty="true">
@@ -137,7 +143,7 @@
                 </entity-options>
             </drop-down>
         </field>
-        <field name="phaseName" parameter-name="workEffortParentId" title="${uiLabelMap.ProjectMgrTaskPhase}*" tooltip="${uiLabelMap.CommonRequired}">
+        <field name="phaseName" use-when="projectId!=void" parameter-name="workEffortParentId" title="${uiLabelMap.ProjectMgrTaskPhase}*" tooltip="${uiLabelMap.CommonRequired}">
             <drop-down allow-empty="false">
                 <entity-options entity-name="WorkEffort" key-field-name="workEffortId" description="${workEffortName}">
                     <entity-constraint name="workEffortTypeId" value="PHASE"/>
@@ -548,7 +554,7 @@
             <hyperlink also-hidden="false" description="${contentName} [${contentId}]" target="ViewSimpleContent?contentId=${contentId}&amp;dataResourceId=${dataResourceId}&amp;communicationEventId=${communicationEventId}&amp;fromDate=${fromDate}"/>
         </field>
         <field name="contentTypeId"><display-entity entity-name="ContentType" description="${description}"/></field>
-        <field name="workEffortContentTypeId"><display-entity entity-name="workEffortContentType" description="${description}"/></field>
+        <field name="workEffortContentTypeId"><display-entity entity-name="WorkEffortContentType" description="${description}"/></field>
         <field name="fromDate"><display/></field>
         <field name="drMimeTypeId"><display-entity entity-name="MimeType" description="${description}" key-field-name="mimeTypeId"/></field>
     </form>
@@ -611,7 +617,7 @@
         <field name="actualStartDate" entry-name="workEffortToActualStartDate" title="${uiLabelMap.WorkEffortActualStartDate}"><display type="date"/></field>
         <field name="actualCompletionDate"  entry-name="workEffortToActualCompletionDate" title="${uiLabelMap.WorkEffortActualCompletionDate}"><display type="date"/></field>
     </form>    
-    <form name="createTaskbyRequest" type="single" target="CreateTaskbyRequests"
+    <form name="EditTaskFromRequest" type="single" target="CreateTaskFromRequest"
         header-row-style="header-row" default-table-style="basic-table">
         <actions>
             <entity-and entity-name="WorkEffortCustRequestView">
@@ -626,7 +632,7 @@
         <field name="taskName" parameter-name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}*" tooltip="${uiLabelMap.CommonRequired}"><text/></field>
         <field name="taskDescription" parameter-name="description" title="${uiLabelMap.CommonDescription}"><text default-value="${custRequest.description}"/></field>
         <field name="workEffortParentId" title="${uiLabelMap.ProjectMgrProjectAndPhaseName}*" parameter-name="workEffortParentId">
-            <drop-down allow-empty="true">
+            <drop-down allow-empty="false">
                 <entity-options entity-name="ProjectAndPhaseAndTask" description="${projectName} : ${phaseName}">    
                     <entity-order-by field-name="workEffortParentId"/>
                     </entity-options>