You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/10/21 06:01:39 UTC

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

Author: hansbak
Date: Mon Oct 20 21:01:38 2008
New Revision: 706506

URL: http://svn.apache.org/viewvc?rev=706506&view=rev
Log:
show toplevel info of the project, if the customer has a client role in the project

Modified:
    ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml
    ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml
    ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml
    ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml

Modified: ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml?rev=706506&r1=706505&r2=706506&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml Mon Oct 20 21:01:38 2008
@@ -47,8 +47,9 @@
     <SecurityGroupPermission groupId="MYPAGE_EMPL-NOEMAIL" permissionId="PARTYMGR_CME_UPDATE"/>
     
     <SecurityPermission permissionId="MYPAGE_CUSTOMER" description="Use the customer screens in mypage."/>
-    <SecurityGroup description="Customer user of mypage, Limited access to own custRequests" groupId="MYPAGE_CUSTOMER"/>
+    <SecurityGroup description="Customer user of mypage, Limited access to own custRequests, and project" groupId="MYPAGE_CUSTOMER"/>
     <SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="PARTYMGR_CME-NOTE_CREATE"/><!-- allow customer to read/write internal notes -->
     <SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="MYPAGE_CUSTOMER"/>
     <SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="PARTYMGR_CME_UPDATE"/>
+    <SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="PROJECTMGR_ROLE_VIEW"/>
 </entity-engine-xml>

Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml?rev=706506&r1=706505&r2=706506&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Mon Oct 20 21:01:38 2008
@@ -214,6 +214,10 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="ListInvoices"/>
     </request-map>    
+    <request-map uri="listProjects">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ListProjects"/>
+    </request-map>    
     
     <!-- EMAIL COMMUNICATIONS -->
     <request-map uri="NewCommunicationEvents">
@@ -270,6 +274,7 @@
     <view-map name="ViewRequest" type="screen" page="component://projectmgr/widget/RequestScreens.xml#ViewRequest"/>
     <view-map name="EditRequest" type="screen" page="component://mypage/widget/MyPageScreens.xml#EditRequest"/>
     <view-map name="ListInvoices" type="screen" page="component://mypage/widget/MyPageScreens.xml#ListInvoices"/>
+    <view-map name="ListProjects" type="screen" page="component://mypage/widget/MyPageScreens.xml#ListProjects"/>
     <view-map name="custPreferences" type="screen" page="component://mypage/widget/CommonScreens.xml#custPreferences"/>
     <view-map name="EditCommunicationEvent" type="screen" page="component://mypage/widget/MyPageScreens.xml#EditCommunicationEvent"/>
     <view-map name="addAttachmentEmail" type="screen" page="component://mypage/widget/MyPageScreens.xml#addAttachmentEmail"/>

Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml?rev=706506&r1=706505&r2=706506&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Mon Oct 20 21:01:38 2008
@@ -87,6 +87,15 @@
             </condition>
             <link target="listInvoices"/>
         </menu-item>
+        <menu-item name="projects" title="${uiLabelMap.ProjectMgrProjects}">
+            <condition>
+                <and>
+                    <not><if-empty field-name="userLogin"/></not>
+                    <if-has-permission permission="MYPAGE_CUSTOMER"/>
+                </and>
+            </condition>
+            <link target="listProjects"/>
+        </menu-item>
         <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed">
             <condition><not><if-empty field-name="userLogin"/></not></condition>
             <link target="logout"/>

Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=706506&r1=706505&r2=706506&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Mon Oct 20 21:01:38 2008
@@ -498,18 +498,14 @@
                 </entity-condition>
             </actions>
             <widgets>
-                <section>
-                    <widgets>
-                        <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
-                            <decorator-section name="body">
-                                <screenlet title="${uiLabelMap.PageTitleListInvoices}" navigation-form-name="ListInvoices">
-                                    <include-form name="ListInvoices"  location="component://mypage/widget/MyPageForms.xml"/>
-                                </screenlet>
-                            </decorator-section>
-                        </decorator-screen>
-                    </widgets>
-                </section>
-            </widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.PageTitleListInvoices}" navigation-form-name="ListInvoices">
+                            <include-form name="ListInvoices"  location="component://mypage/widget/MyPageForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+           </widgets>
         </section>
     </screen>
     <screen name="CreateCustRequestNotification">
@@ -647,4 +643,69 @@
             </widgets>
         </section>
     </screen>
+    <screen name="ListProjects">
+        <section>
+            <actions>
+                <set field="headerItem" value="projects"/>
+                <set field="layoutSettings.javaScripts[]" value="/images/jsgantt.js" global="true"/>
+                <set field="layoutSettings.styleSheets[]" value="/images/jsgantt.css" global="true"/>
+                <entity-condition list-name="projects" entity-name="WorkEffortPartyAssignment" filter-by-date="true">
+                    <condition-list combine="and">
+                        <condition-expr field-name="partyId" env-name="userLogin.partyId"/>
+                        <condition-list combine="or">
+                            <condition-expr field-name="roleTypeId" value="CLIENT_MANAGER"/>
+                            <condition-expr field-name="roleTypeId" value="CLIENT_ANALYST"/>
+                            <condition-expr field-name="roleTypeId" value="CLIENT_BILLING"/>
+                        </condition-list>
+                    </condition-list>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <iterate-section entry-name="project" list-name="projects">
+                            <section>
+                                <actions>
+                                    <set field="projectId" from-field="project.workEffortId"/>
+                                    <set field="parameters.projectId" from-field="project.workEffortId"/>
+                                    <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy"/>
+                                    <service service-name="getProject" result-map-name="result">
+                                        <field-map field-name="projectId" env-name="projectId"/>
+                                    </service>
+                                    <set field="project" from-field="result.projectInfo"/>
+                                </actions>
+                                <widgets>
+                                    <label style="h1" text="${uiLabelMap.ProjectMgrProjectCurrent}: ${project.projectName}[${project.projectId}]"/>
+                                    <container style="lefthalf">
+                                        <screenlet title="${uiLabelMap.PageTitleProjectInformation}">
+                                            <include-form name="ProjectInfo" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
+                                        </screenlet>
+                                        <include-screen name="PhasesInfo" location="component://projectmgr/widget/ProjectScreens.xml"/>
+                                    </container>
+                                    <container style="righthalf">
+                                        <include-screen name="TasksInfo" location="component://projectmgr/widget/ProjectScreens.xml"/>
+                                    </container>
+                                    <container style="clear"/>
+                                    <label text="====${parameters.projectId}"></label>
+                                    <screenlet title="${uiLabelMap.PageTitleProjectGanttChart}">
+                                        <platform-specific>
+                                            <html><html-template location="component://projectmgr/webapp/projectmgr/project/gantChart.ftl"/></html>
+                                        </platform-specific>
+                                    </screenlet>
+                                </widgets>
+                            </section>
+                        </iterate-section>
+                        <section>
+                            <condition>
+                                <if-empty field-name="projects"/>
+                            </condition>
+                            <widgets>
+                                <label style="h2" text="no projects found"></label>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml?rev=706506&r1=706505&r2=706506&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectPermissionServices.xml Mon Oct 20 21:01:38 2008
@@ -101,9 +101,9 @@
         
         <!-- PHASE -->
         <if-compare field="sec_object" value="PHASE" operator="equals">
-            <!--log level="info" message="======ProjectMGR Security=====  action: ${parameters.mainAction} object: ${sec_object} Id: ${parameters.projectId} resourceDescription: ${parameters.resourceDescription}"/-->
             <set field="projectId" from-field="parameters.projectId"/>
             <set field="partyId" from-field="parameters.userLogin.partyId"/>
+            <!--log level="info" message="======ProjectMGR Security=====  action: ${parameters.mainAction} object: ${sec_object} projectId: ${projectId} resourceDescription: ${parameters.resourceDescription}"/-->
             <call-simple-method method-name="checkProjectMembership"/>
             <if>
                 <condition>
@@ -148,8 +148,8 @@
                 <set field="phaseId" from-field="parameters.workEffortParentId"/>
             </if-empty>
             <set field="partyId" from-field="parameters.userLogin.partyId"/>
-            <!--call-simple-method method-name="checkProjectMembership"/-->
-            <!-- log level="info" message="======ProjectMGR Security=====  action: ${parameters.mainAction} object: ${sec_object} Id: ${parameters.taskId} PhaseId:  ${parameters.workEffortParentId} resourceDescription: ${parameters.resourceDescription} isMember: ${isMember}"/-->
+            <call-simple-method method-name="checkProjectMembership"></call-simple-method>
+            <!--log level="info" message="======ProjectMGR Security=====  action: ${parameters.mainAction} object: ${sec_object} Id: ${parameters.taskId} PhaseId:  ${parameters.workEffortParentId} resourceDescription: ${parameters.resourceDescription} isMember: ${isMember}"/-->
             <entity-and list-name="custRequests" entity-name="WorkEffortCustRequestView">
                 <field-map field-name="workEffortId" env-name="taskId"/>
             </entity-and>
@@ -278,7 +278,7 @@
             <set field="timesheetId" from-field="timesheet.timesheetId"/>
             <set field="taskId" from-field="parameters.workEffortId"/>
             <set field="partyId" from-field="timesheet.partyId"/>
-            <!-- call-simple-method method-name="checkProjectMembership"/-->
+            <call-simple-method method-name="checkProjectMembership"/>
             <!-- log level="info" message="======ProjectMGR Security=====  action: ${mainAction} object: ${sec_object} timesheetId: ${timesheetId} from partyId: ${partyId} workEffortId: ${parameters.workEffortId} resourceDescription: ${parameters.resourceDescription}"/-->
             <if>
                 <condition>

Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml?rev=706506&r1=706505&r2=706506&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml Mon Oct 20 21:01:38 2008
@@ -21,12 +21,13 @@
 <service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
         
+    <!-- temporary disabled because it caused a db lock with the checkProjectMembership in projectpermission services -->
         <!-- check if testing or validation of completed tasks in this project is required, if so, assign the responsible party to the task -->
-    <eca service="updateTaskAssigment" event="invoke">
+    <!--eca service="updateTaskAssigment" event="invoke">
         <condition field-name="statusId" operator="equals" value="PAS_COMPLETED"/>
         <condition field-name="roleTypeId" operator="not-equals" value="PROVIDER_TESTER"/>
         <condition field-name="roleTypeId" operator="not-equals" value="PROVIDER_VALIDATOR"/>
         <action service="addValidationPartiesToTask" mode="sync"/>
-    </eca>
+    </eca-->
     
 </service-eca>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=706506&r1=706505&r2=706506&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Mon Oct 20 21:01:38 2008
@@ -509,22 +509,11 @@
                 <label text="${project}"></label>
                 <decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <container style="screenlet">
-                            <container style="screenlet-title-bar">
-                                <container style="h3">
-                                    <label text="${uiLabelMap.PageTitleProjectGanttChart}"/>
-                                </container>
-                            </container>
-                            <container style="screenlet-body">
-                                <section>
-                                    <widgets>    
-                                        <platform-specific>
-                                            <html><html-template location="component://projectmgr/webapp/projectmgr/project/gantChart.ftl"/></html>
-                                        </platform-specific>
-                                    </widgets>
-                                </section>
-                            </container>
-                        </container>
+                        <screenlet title="${uiLabelMap.PageTitleProjectGanttChart}">
+                            <platform-specific>
+                                <html><html-template location="component://projectmgr/webapp/projectmgr/project/gantChart.ftl"/></html>
+                            </platform-specific>
+                        </screenlet>
                     </decorator-section>
                 </decorator-screen>
             </widgets>