Author: hansbak
Date: Tue Aug 12 17:16:17 2008 New Revision: 685396 URL: http://svn.apache.org/viewvc?rev=685396&view=rev Log: screenlet conversion, cleanup, improvement of taskview screen Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.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=685396&r1=685395&r2=685396&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Tue Aug 12 17:16:17 2008 @@ -307,8 +307,7 @@ <if-not-empty field="task"> <get-related-one value-name="task" relation-name="ParentWorkEffort" to-value-name="phase"/> <else> - <log level="error" message="Requested taskId (workEffortId): ${parameters.taskId} not found"/> - <return response-code="error"/> + <return/> </else> </if-not-empty> <else> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=685396&r1=685395&r2=685396&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Tue Aug 12 17:16:17 2008 @@ -459,45 +459,30 @@ <set field="tabButtonItem" value="taskView"/> <set field="workEffortId" from-field="parameters.workEffortId"/> <set field="projectId" from-field="parameters.workEffortId"/> - <service service-name="getProjectTask" result-map-name="result"> + <service service-name="getProjectTask" result-map-name="taskResult"> + <field-map field-name="taskId" env-name="workEffortId"/> + </service> + <set field="task" from-field="taskResult.taskInfo"/> + <service service-name="getProjectIdAndNameFromTask" result-map-name="projectResult"> <field-map field-name="taskId" env-name="workEffortId"/> </service> - <set field="task" from-field="result.taskInfo"/> </actions> <widgets> <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <section> - <condition> - <not><if-empty field-name="task"/></not> - </condition> - <widgets> - <container style="lefthalf"> - <container style="screenlet"> - <container style="screenlet-title-bar"> - <container style="h3"> - <label text="${uiLabelMap.PageTitleTaskInformation}"/> - </container> - </container> - <container style="screenlet-body"> - <section> - <widgets> - <include-form name="TaskInfo" location="component://projectmgr/widget/forms/TaskForms.xml"/> - </widgets> - </section> - </container> - </container> - <include-screen name="taskBefore"/> - <include-screen name="taskAfter"/> - </container> - <container style="righthalf"> - <include-screen name="TaskTeamInfo"/> - <include-screen name="ListTaskContent"/> - <include-screen name="NoteInfo"/> - <include-screen name="ListWorkEffortRequests"/> - </container> - </widgets> - </section> + <container style="lefthalf"> + <screenlet title="${uiLabelMap.PageTitleTaskInformation}"> + <include-form name="TaskInfo" location="component://projectmgr/widget/forms/TaskForms.xml"/> + </screenlet> + <include-screen name="taskBefore"/> + <include-screen name="taskAfter"/> + </container> + <container style="righthalf"> + <include-screen name="TaskTeamInfo"/> + <include-screen name="ListTaskContent"/> + <include-screen name="NoteInfo"/> + <include-screen name="ListWorkEffortRequests"/> + </container> </decorator-section> </decorator-screen> </widgets> @@ -662,54 +647,29 @@ <screen name="EditTaskFromRequest"> <section> <actions> - <set field="titleProperty" value="PageTitleEditTaskList"/> + <set field="titleProperty" value="PageTitleEditTask"/> <set field="headerItem" value="request"/> <set field="tabButtonItem" value="edittask"/> - <set field="labelTitleProperty" value="PageTitleEditTaskList"/> - <set field="workEffortId" from-field="parameters.workEffortId"/> - <entity-one entity-name="CustRequest" value-name="custRequest"></entity-one> - <entity-one entity-name="WorkEffort" value-name="task"/> - <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.bsh"/> + <set field="labelTitleProperty" value="PageTitleEditTask"/> + <entity-one entity-name="CustRequest" value-name="custRequest"/> + <entity-one entity-name="PartyNameView" value-name="partyName"> + <field-map field-name="partyId" env-name="custRequest.fromPartyId"/> + </entity-one> </actions> <widgets> <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <section> - <widgets> - <container style="lefthalf"> - <container style="screenlet"> - <container style="screenlet-title-bar"> - <container style="h3"> - <label text="${uiLabelMap.PageTitleCreateTaskbyRequest}"/> - </container> - </container> - <container style="screenlet-body"> - <section> - <widgets> - <include-form name="EditTaskFromRequest" location="component://projectmgr/widget/forms/TaskForms.xml"/> - </widgets> - </section> - </container> - </container> - </container> - <container style="righthalf"> - <container style="screenlet"> - <container style="screenlet-title-bar"> - <container style="h3"> - <label text="${uiLabelMap.ProjectMgrCreateByExistingTask}"/> - </container> - </container> - <container style="screenlet-body"> - <section> - <widgets> - <include-form name="CreateCustRequestWorkEffortByExistingTaskForm" location="component://projectmgr/widget/forms/TaskForms.xml"/> - </widgets> - </section> - </container> - </container> - </container> - </widgets> - </section> + <label style="h1" text="${uiLabelMap.OrderRequest} : ${custRequest.custRequestName} [${parameters.custRequestId}] ${uiLabelMap.CommonFrom} ${partyName.firstName} ${partyName.middleName} ${partyName.lastName} ${partyName.groupName} "></label> + <container style="lefthalf"> + <screenlet title="${uiLabelMap.PageTitleCreateTaskbyRequest}"> + <include-form name="EditTaskFromRequest" location="component://projectmgr/widget/forms/TaskForms.xml"/> + </screenlet> + </container> + <container style="righthalf"> + <screenlet title="${uiLabelMap.ProjectMgrCreateByExistingTask}"> + <include-form name="CreateCustRequestWorkEffortByExistingTaskForm" location="component://projectmgr/widget/forms/TaskForms.xml"/> + </screenlet> + </container> </decorator-section> </decorator-screen> </widgets> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=685396&r1=685395&r2=685396&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Tue Aug 12 17:16:17 2008 @@ -491,12 +491,13 @@ <hyperlink target="updateTaskNote?workEffortId=${workEffortId}&noteId=${noteId}&internalNote=N" description="${uiLabelMap.OrderNotesPublic}"></hyperlink> </field> </form> - <form name="AddTaskNote" extends="AddWorkEffortNote" extends-resource="component://workeffort/widget/WorkEffortForms.xml" type="single" target="createTaskNote" title="" - header-row-style="header-row" default-table-style="basic-table"> - </form> - <form name="TaskInfo" type="single" default-map-name="task" - header-row-style="header-row" default-table-style="basic-table"> - <field name="taskName" title="${uiLabelMap.ProjectMgrTaskName}"><display/></field> + <form name="AddTaskNote" extends="AddWorkEffortNote" extends-resource="component://workeffort/widget/WorkEffortForms.xml" type="single" target="createTaskNote"/> + <form name="TaskInfo" type="single" default-map-name="task"> + <field name="taskName" title="${uiLabelMap.ProjectMgrTaskName}"><display description="${task.taskName} [${task.taskId}]"/></field> + <field name="phaseName" title="${uiLabelMap.ProjectMgrPhaseName}"><display description="${projectResult.phaseName} [${projectResult.phaseId}]"/></field> + <field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}"> + <hyperlink target="projectView?projectId=${projectResult.projectId}" description="${projectResult.projectName} [${projectResult.projectId}]"/> + </field> <field name="taskDescription" title="${uiLabelMap.CommonDescription}"><display/></field> <field name="currentStatusId"><display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"></display-entity></field> <field name="priority" title="${uiLabelMap.CommonPriority}"><display type="date"/></field> @@ -617,19 +618,12 @@ <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="EditTaskFromRequest" type="single" target="CreateTaskFromRequest" - header-row-style="header-row" default-table-style="basic-table"> - <actions> - <entity-and entity-name="WorkEffortCustRequestView"> - <field-map field-name="workEffortId"/> - </entity-and> - </actions> + <form name="EditTaskFromRequest" type="single" target="CreateTaskFromRequest"> <field name="custRequestId"><hidden value="${parameters.custRequestId}"/></field> <field name="projectId"><hidden value="${parameters.projectId}"/></field> <field name="workEffortTypeId"><hidden value="TASK"/></field> - <field name="currentStatusId"><hidden value="CAL_ACCEPTED"/></field> - <field name="statusId"><hidden value="CRQ_ACCEPTED"/></field> - <field name="taskName" parameter-name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}*" tooltip="${uiLabelMap.CommonRequired}"><text/></field> + <field name="currentStatusId"><hidden value="PTS_CREATED"/></field> + <field name="taskName" parameter-name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}*" tooltip="${uiLabelMap.CommonRequired}"><text default-value="${custRequest.custRequestName}"/></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="false"> @@ -670,13 +664,16 @@ <field name="estimatedCompletionDate" title="${uiLabelMap.FormFieldTitle_estimatedCompletionDate}"><date-time type="date"/></field> <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field> </form> - <form name="CreateCustRequestWorkEffortByExistingTaskForm" type="single" target="createTaskListForms" - header-row-style="header-row" default-table-style="basic-table"> + <form name="CreateCustRequestWorkEffortByExistingTaskForm" type="single" target="createTaskListForms"> <field name="custRequestId"><hidden/></field> <field name="statusId"><hidden value="CRQ_ACCEPTED"/></field> <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}"> <drop-down allow-empty="false"> - <entity-options entity-name="ProjectPartyAndPhaseAndTask" description="${projectName} - ${phaseName}"/> + <entity-options entity-name="ProjectAndPhaseAndTask" description="${projectName}-${phaseName}-${workEffortName}"> + <entity-order-by field-name="projectName"/> + <entity-order-by field-name="phaseName"/> + <entity-order-by field-name="workEffortName"/> + </entity-options> </drop-down> </field> <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field> |
Free forum by Nabble | Edit this page |