Author: hansbak
Date: Wed Nov 28 19:25:16 2007 New Revision: 599253 URL: http://svn.apache.org/viewvc?rev=599253&view=rev Log: adapted the project search screen, corrected some problmes in the getProject service, add a taskname search Added: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh - copied, changed from r598948, ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListMyTasks.bsh Removed: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListMyTasks.bsh Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.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=599253&r1=599252&r2=599253&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Wed Nov 28 19:25:16 2007 @@ -33,11 +33,18 @@ <set field="highInfo.projectName" from-field="project.workEffortName"/> <set field="highInfo.projectDescription" from-field="project.description"/> <set field="highInfo.priority" from-field="project.priority"/> + <set field="highInfo.currentStatusId" from-field="project.currentStatusId"/> <set field="highInfo.scopeEnumId" from-field="project.scopeEnumId"/> <entity-one entity-name="StatusItem" value-name="highSeq"> - <field-map field-name="statusId" env-name="phase.currentStatusId"/> + <field-map field-name="statusId" env-name="project.currentStatusId"/> </entity-one> <set field="highInfo.sequenceId" from-field="highSeq.sequenceId"/> + <set field="highInfo.statusDescription" from-field="highSeq.description"/> + <set field="highInfo.createdDate" from-field="project.createdDate"/> + <set field="highInfo.estimatedStartDate" from-field="project.estimatedStartDate"/> + <set field="highInfo.estimatedCompletionDate" from-field="project.estimatedCompletionDate"/> + <set field="highInfo.actualStartDate" from-field="project.actualStartDate"/> + <set field="highInfo.actualCompletionDate" from-field="project.actualCompletionDate"/> <!-- loop through the related phases and tasks --> <get-related value-name="project" relation-name="ChildWorkEffort" list-name="phases"/> Copied: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh (from r598948, ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListMyTasks.bsh) URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh?p2=ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh&p1=ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListMyTasks.bsh&r1=598948&r2=599253&rev=599253&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListMyTasks.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh Wed Nov 28 19:25:16 2007 @@ -39,16 +39,16 @@ import java.sql.Timestamp; fromDate = parameters.get("fromDate"); -thruDate = parameters.get("thruDate"); +workEffortName = parameters.get("workEffortName"); userLogin = parameters.get("userLogin"); -// date conditions -dateCondition = new LinkedList(); +// entry conditions +entryCondition = new LinkedList(); if (UtilValidate.isNotEmpty(fromDate)) { - dateCondition.add(new EntityExpr("createdDate", EntityOperator.GREATER_THAN, fromDate + " 00:00:00.0")); + entryCondition.add(new EntityExpr("createdDate", EntityOperator.GREATER_THAN, fromDate + " 00:00:00.0")); } -if (UtilValidate.isNotEmpty(thruDate)) { - dateCondition.add(new EntityExpr("createdDate", EntityOperator.LESS_THAN, thruDate + " 00:00:00.0")); +if (UtilValidate.isNotEmpty(workEffortName)) { + entryCondition.add(new EntityExpr("workEffortName", EntityOperator.LIKE, "%" + workEffortName + "%")); } // create workEffort list for tasks with no phase. @@ -56,14 +56,14 @@ new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "TASK"), new EntityExpr("workEffortParentId", EntityOperator.EQUALS, null), new EntityExpr("createdByUserLogin", EntityOperator.EQUALS, userLogin.getString("userLoginId"))); -if (UtilValidate.isNotEmpty(dateCondition)) exprList.addAll(dateCondition); +if (UtilValidate.isNotEmpty(entryCondition)) exprList.addAll(entryCondition); condition = new EntityConditionList(exprList, EntityOperator.AND); tasks = delegator.findByCondition("WorkEffort", condition, null, null); // create workEffort list in a project exprList = UtilMisc.toList( new EntityExpr("createdByUserLogin", EntityOperator.EQUALS, userLogin.getString("userLoginId"))); -if (UtilValidate.isNotEmpty(dateCondition)) exprList.addAll(dateCondition); +if (UtilValidate.isNotEmpty(entryCondition)) exprList.addAll(entryCondition); condition = new EntityConditionList(exprList, EntityOperator.AND); tasks.addAll(delegator.findByCondition("ProjectAndPhaseAndTask", condition, null, null)); @@ -71,7 +71,7 @@ exprList = UtilMisc.toList( new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "TASK"), new EntityExpr("createdByUserLogin", EntityOperator.NOT_EQUAL, userLogin.getString("userLoginId"))); //already have these -if (UtilValidate.isNotEmpty(dateCondition)) exprList.addAll(dateCondition); +if (UtilValidate.isNotEmpty(entryCondition)) exprList.addAll(entryCondition); condition = new EntityConditionList(exprList, EntityOperator.AND); tasks.addAll(delegator.findByCondition("WorkEffortAndTimeEntry", condition, null, null)); Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=599253&r1=599252&r2=599253&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Wed Nov 28 19:25:16 2007 @@ -75,19 +75,26 @@ <set field="labelTitleProperty" value="ProjectMgrProjectName"/> <set field="donePage" from-field="parameters.DONE_PAGE" default-value="/workeffort/control/FindProject"/> <set field="workEffortId" from-field="parameters.projectId"/> - <set field="workEffortTypeId" from-field="parameters.workEffortTypeId"/> - <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjectsByDateRange.bsh"/> + <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/FindProject.bsh"/> </actions> <widgets> <decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <section> - <widgets> - <platform-specific> - <html><html-template location="component://projectmgr/webapp/projectmgr/project/listprojectsbydaterange.ftl"/></html> - </platform-specific> - <container style="button-bar"><link target="EditProject?workEffortTypeId=PROJECT" text="${uiLabelMap.ProjectMgrNewProject}" style="buttontext"/></container> - <include-form name="ListProjects" location="component://projectmgr/widget/forms/ProjectForms.xml"/> + <widgets> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditProject} ${uiLabelMap.CommonInformation}</label></container> + <container style="screenlet-body"> + <include-form name="FindProject" location="component://projectmgr/widget/forms/ProjectForms.xml"/> + </container> + </container> + <container style="button-bar"><link target="EditProject" text="${uiLabelMap.ProjectMgrNewProject}" style="buttontext"/></container> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditProject} ${uiLabelMap.CommonInformation}</label></container> + <container style="screenlet-body"> + <include-form name="ListProjects" location="component://projectmgr/widget/forms/ProjectForms.xml"/> + </container> + </container> </widgets> </section> </decorator-section> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=599253&r1=599252&r2=599253&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Wed Nov 28 19:25:16 2007 @@ -90,7 +90,7 @@ <set field="titleProperty" value="PageTitleFindTask"/> <set field="labelTitleProperty" value="ProjectMgrTaskName"/> <set field="donePage" from-field="parameters.DONE_PAGE" default-value="/workeffort/control/Dependencies"/> - <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListMyTasks.bsh"/> + <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh"/> </actions> <widgets> <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}"> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=599253&r1=599252&r2=599253&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Wed Nov 28 19:25:16 2007 @@ -54,19 +54,22 @@ <field use-when="project!=null" name="actualCompletionDate" title="${uiLabelMap.FormFieldTitle_actualCompletionDate}"><display description="${bsh:project.get("actualCompletionDate")!=null?project.get("actualCompletionDate").toString().substring(0,10):"";}"/></field> <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field> </form> - - <!--================ Project Lists==============--> + <form name="FindProject" type="single" target="FindProjectByRange"> + <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><date-time type="date"/></field> + <field name="projectName" parameter-name="workEffortName" title="${uiLabelMap.ProjectMgrProjectName}"><text/></field> + <field name="find" title="${uiLabelMap.CommonFind}"><submit/></field> + </form> <form name="ListProjects" type="list" list-name="projects" paginate-target="FindProject"> - <field name="workEffortId" title="${uiLabelMap.ProjectMgrWorkEffortId}" widget-style="buttontext"> - <hyperlink also-hidden="false" description="${workEffortId}" target="EditProject?projectId=${workEffortId}"/> + <field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${projectName}" target="projectView?projectId=${projectId}"/> </field> - <field name="workEffortName" title="${uiLabelMap.CommonName}"><display/></field> - <field name="workEffortTypeId" title="${uiLabelMap.ProjectMgrWorkEffortTypeId}"><display-entity entity-name="WorkEffortType"/></field> - <field name="workEffortPurposeTypeId" title="${uiLabelMap.ProjectMgrWorkEffortPurposeTypeId}"><display-entity entity-name="WorkEffortPurposeType"/></field> - <!--field name="projectView" title="${uiLabelMap.ProjectMgrProjectSummary}" widget-style="linktext"> - <hyperlink also-hidden="false" description="${uiLabelMap.ProjectMgrProjectSummary}" target="projectView?workEffortId=${workEffortId}"/> - </field--> - <field name="createdStamp"><display/></field> + <field name="statusDescription" title="${uiLabelMap.CommonStatus}"><display/></field> + <field name="priority" title="${uiLabelMap.CommonPriority}"><display type="date"/></field> + <field name="estimatedStartDate" title="${uiLabelMap.WorkEffortEstimatedStartDate}"><display type="date"/></field> + <field name="estimatedCompletionDate" title="${uiLabelMap.WorkEffortEstimatedCompletionDate}"><display type="date"/></field> + <field name="actualStartDate" title="${uiLabelMap.WorkEffortActualStartDate}"><display type="date"/></field> + <field name="actualCompletionDate" title="${uiLabelMap.WorkEffortActualCompletionDate}"><display type="date"/></field> + <field name="createdDate"><display type="date"/></field> </form> <form name="ListChildEfforts" target="updateProjectAndAssoc" title="" list-name="projects" type="list" separate-columns="true" paginate-target="FindProject"> <row-actions> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=599253&r1=599252&r2=599253&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Wed Nov 28 19:25:16 2007 @@ -156,7 +156,7 @@ <form name="FindTask" type="single" target="MyTasks"> <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><date-time type="date"/></field> - <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><date-time type="date"/></field> + <field name="taskName" parameter-name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}"><text/></field> <field name="find" title="${uiLabelMap.CommonFind}"><submit/></field> </form> <form name="ListTasks" type="list" list-name="tasks" paginate-target="Dependencies"> |
Free forum by Nabble | Edit this page |