Author: hansbak
Date: Sat Nov 1 10:39:55 2008 New Revision: 709732 URL: http://svn.apache.org/viewvc?rev=709732&view=rev Log: hide several buttons and do not show closed projects on lists Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.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=709732&r1=709731&r2=709732&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Sat Nov 1 10:39:55 2008 @@ -580,6 +580,10 @@ <set field="highInfo.currentStatusId" value="PTS_CREATED_IP"/> </then> </if> + <!-- closed overrules everything --> + <if-compare field="project.currentStatusId" value="PRJ_CLOSED" operator="equals"> + <set field="highInfo.currentStatusId" value="PRJ_CLOSED"/> + </if-compare> <call-simple-method method-name="createDates"/> Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy?rev=709732&r1=709731&r2=709732&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy Sat Nov 1 10:39:55 2008 @@ -27,7 +27,7 @@ allProjects.each { project -> result = dispatcher.runSync("getProject", ["userLogin" : parameters.userLogin, "projectId" : project.workEffortId]); if (result.projectInfo) { - if (!result.projectInfo.currentStatusId.equals("PTS_COMPLETED") && !result.projectInfo.currentStatusId.equals("PTS_CANCELLED")) { + if (!result.projectInfo.currentStatusId.equals("PTS_COMPLETED") && !result.projectInfo.currentStatusId.equals("PTS_CANCELLED") && !result.projectInfo.currentStatusId.equals("PRJ_CLOSED")) { resultAssign = delegator.findByAnd("WorkEffortPartyAssignment", ["partyId" : parameters.userLogin.partyId, "workEffortId" : project.workEffortId]) if (security.hasEntityPermission("PROJECTMGR", "_ADMIN", session) || ((security.hasEntityPermission("PROJECTMGR", "_ROLE_ADMIN", session) || security.hasEntityPermission("PROJECTMGR", "_ROLE_VIEW", session)) && resultAssign)) { Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=709732&r1=709731&r2=709732&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Sat Nov 1 10:39:55 2008 @@ -93,6 +93,7 @@ <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_CANCELED"/> + <if-compare field-name="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/> </and> </condition> <link target="EditProject?projectId=${projectId}"/> @@ -104,6 +105,7 @@ <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_CANCELED"/> + <if-compare field-name="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/> </and> </condition> <link target="FindPhase?projectId=${projectId}"/> @@ -115,6 +117,7 @@ <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_CANCELED"/> + <if-compare field-name="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/> </and> </condition> <link target="EditProjectTasks?projectId=${projectId}"/> @@ -126,6 +129,7 @@ <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_CANCELED"/> + <if-compare field-name="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/> </and> </condition> <link target="ListWorkEffortPartyAssigns?projectId=${projectId}"/> @@ -137,6 +141,7 @@ <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_CANCELED"/> + <if-compare field-name="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/> </and> </condition> <link target="EditProjectContents?projectId=${projectId}"/> @@ -145,9 +150,6 @@ <condition> <and> <if-compare field-name="hasUpdatePermission" operator="equals" value="true"/> - <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/> - <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/> - <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_CANCELED"/> </and> </condition> <link target="EditWorkEffortNotes?projectId=${projectId}"/> @@ -159,6 +161,7 @@ <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_CANCELED"/> + <if-compare field-name="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/> </and> </condition> <link target="ListSubProjects?projectId=${projectId}&subProjects=true"/> @@ -170,6 +173,7 @@ <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/> <if-compare field-name="project.currentStatusId" operator="not-equals" value="PTS_CANCELED"/> + <if-compare field-name="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/> </and> </condition> <link target="projectBilling?projectId=${projectId}"/> @@ -208,6 +212,7 @@ <menu-item name="schedule" title="${uiLabelMap.ProjectMgrSchedule}"> <condition> <and> + <if-compare field-name="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/> <not> <if-empty field-name="project"/> </not> @@ -227,6 +232,18 @@ </condition> <link target="copyProjectToTemplate?projectId=${projectId}"></link> </menu-item> + <menu-item name="close" title="${uiLabelMap.CommonClose}"> + <condition> + <and> + <if-compare field-name="project.currentStatusId" operator="not-equals" value="PRJ_CLOSED"/> + <not> + <if-empty field-name="project"/> + </not> + <if-compare field-name="hasUpdatePermission" operator="equals" value="true"/> + </and> + </condition> + <link target="javascript:confirmActionLink('Are you sure you want to close this project?','updateProject?workEffortId=${parameters.projectId}&currentStatusId=PRJ_CLOSED')" url-mode="plain"/> + </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}"> |
Free forum by Nabble | Edit this page |