svn commit: r704777 - in /ofbiz/trunk/specialpurpose/projectmgr: config/ webapp/projectmgr/WEB-INF/ widget/ widget/forms/

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

svn commit: r704777 - in /ofbiz/trunk/specialpurpose/projectmgr: config/ webapp/projectmgr/WEB-INF/ widget/ widget/forms/

hansbak-2
Author: hansbak
Date: Tue Oct 14 21:13:54 2008
New Revision: 704777

URL: http://svn.apache.org/viewvc?rev=704777&view=rev
Log:
add roles to project resources and some refactoring in projectmanager

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml
    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/ProjectScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ResourceForms.xml

Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml?rev=704777&r1=704776&r2=704777&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml Tue Oct 14 21:13:54 2008
@@ -699,6 +699,9 @@
         <value xml:lang="th">รหัสโปรเจค</value>
         <value xml:lang="zh">项目Id</value>
     </property>
+    <property key="ProjectMgrProjects">
+        <value xml:lang="en">Projects</value>
+    </property>
     <property key="ProjectMgrProjectName">
         <value xml:lang="en">Project Name</value>
         <value xml:lang="fr">Nom du projet</value>

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=704777&r1=704776&r2=704777&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Tue Oct 14 21:13:54 2008
@@ -589,10 +589,6 @@
         <response name="success" type="request-redirect-noparam" value="requestlist"/>
         <response name="error" type="view" value="EditRequest"/>
     </request-map>
-    <request-map uri="viewprofile">
-        <security https="true" auth="true"/>
-        <response name="success" type="view" value="viewprofile"/>
-    </request-map>
     <request-map uri="listResourcesTask">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="listResourcesTask"/>
@@ -797,6 +793,7 @@
 
     <!-- View Mappings -->
     <view-map name="viewprofile" type="screen" page="component://projectmgr/widget/ResourceScreens.xml#viewprofile"/>
+    <view-map name="viewroles" type="screen" page="component://projectmgr/widget/ResourceScreens.xml#viewroles"/>
     <view-map name="listResourcesTask" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#listResourcesTask"/>
     <view-map name="listResourcesProject" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#listResourcesProject"/>
     <view-map name="EditPartyGroup" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditPartyGroup"/>
@@ -805,7 +802,7 @@
     <view-map name="showvisits" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#showvisits"/>
     <view-map name="AddPartyNote" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#AddPartyNote"/>
     <view-map name="editcontactmech" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#editcontactmech"/>
-    <view-map name="EditPartyRates" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditPartyRates"/>
+    <view-map name="EditPartyRates" type="screen" page="component://projectmgr/widget/ResourceScreens.xml#EditPartyRates"/>
     
     <view-map name="main" type="screen" page="component://projectmgr/widget/CommonScreens.xml#Main"/>
     <view-map name="ganttChart" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#ganttChart"/>    

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml?rev=704777&r1=704776&r2=704777&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml Tue Oct 14 21:13:54 2008
@@ -50,30 +50,6 @@
         </section>
     </screen>
 
-    <screen name="CommonResourceDecorator">
-        <section>
-            <actions>
-                <set field="headerItem" value="resources"/>                
-            </actions>
-            <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <section>
-                            <condition>
-                                <if-has-permission permission="PROJECTMGR" action="_VIEW"/>
-                            </condition>
-                            <widgets>
-                                <decorator-section-include name="body"/>
-                            </widgets>
-                            <fail-widgets>
-                                <label style="h3">${uiLabelMap.ProjectMgrViewPermissionError}</label>
-                            </fail-widgets>
-                        </section>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
     <screen name="CommonProjectDecorator">
         <section>
             <actions>
@@ -324,7 +300,7 @@
             </widgets>
         </section>
     </screen>
-    <screen name="CommonListResourceDecorator">
+    <screen name="CommonPartyDecorator">
         <section>
             <actions>
                 <set field="headerItem" value="resources"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=704777&r1=704776&r2=704777&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Tue Oct 14 21:13:54 2008
@@ -367,7 +367,10 @@
         <menu-item name="ResourcesProfile" title="${uiLabelMap.PartyProfile}">
             <link target="viewprofile?partyId=${partyId}"/>
         </menu-item>
-        <menu-item name="listResourcesProject" title="${uiLabelMap.ProjectMgrProjectId}">
+        <menu-item name="viewroles" title="${uiLabelMap.PartyRoles}">
+            <link target="viewroles?partyId=${partyId}"/>
+        </menu-item>
+        <menu-item name="listResourcesProject" title="${uiLabelMap.ProjectMgrProjects}">
             <link target="listResourcesProject?partyId=${partyId}"></link>
         </menu-item>
         <menu-item name="listResourcesTask"  title="${uiLabelMap.ProjectMgrTaskId}">

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=704777&r1=704776&r2=704777&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Tue Oct 14 21:13:54 2008
@@ -659,7 +659,7 @@
                 <entity-one entity-name="WorkEffortPartyAssignment" value-name="workEffortPartyAssignment"/>
             </actions>
             <widgets>              
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet id="AddResourceProjectPartyPanel" title="${uiLabelMap.PageTitleAddProject}" collapsible="true">
                             <include-form name="AddResourceProjectParty" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
@@ -687,7 +687,7 @@
                 <set field="partyId" from-field="parameters.partyId"/>
             </actions>
             <widgets>  
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet id="AddResourceTaskPartyPanel" title="${uiLabelMap.PageTitleAddTask}" collapsible="true">
                             <include-form name="AddResourceTaskParty" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
@@ -863,29 +863,6 @@
         </section>
     </screen>
     
-    <screen name="EditPartyRates">
-        <section>
-            <actions>
-                <set field="titleProperty" value="PageTitleEditPartyRates"/>
-                <set field="headerItem" value="find"/>
-                <set field="tabButtonItem" value="EditPartyRates"/>
-                <set field="labelTitleProperty" value="PageTitleEditPartyRates"/>
-                
-                <set field="partyId" from-field="parameters.partyId"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <screenlet id="AddPartyRatePanel" title="${uiLabelMap.PageTitleEditPartyRates}" collapsible="true">
-                            <include-form name="AddPartyRate" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
-                        </screenlet>
-                        <include-form name="ListPartyRates" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    
     <screen name="CreateUserLogin">
         <section>
             <actions>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml?rev=704777&r1=704776&r2=704777&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml Tue Oct 14 21:13:54 2008
@@ -33,7 +33,7 @@
                 </entity-and>
             </actions>                                                
             <widgets>  
-                <decorator-screen name="CommonResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet id="AddResourcePanel" title="${uiLabelMap.PageTitleAddResource}" collapsible="true">
                             <include-form name="AddResource" location="component://projectmgr/widget/forms/ResourceForms.xml"/>
@@ -54,7 +54,7 @@
                 <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListUnBilledHoursResources.bsh"/>
             </actions>                                                
             <widgets>  
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet>
                             <screenlet title="${uiLabelMap.ProjectMgrUnbilledHours}">
@@ -82,7 +82,7 @@
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <section>
                             <condition>
@@ -102,4 +102,58 @@
             </widgets>
         </section>
     </screen>
+
+    <screen name="EditPartyRates">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditPartyRates"/>
+                <set field="headerItem" value="find"/>
+                <set field="tabButtonItem" value="EditPartyRates"/>
+                <set field="labelTitleProperty" value="PageTitleEditPartyRates"/>
+                
+                <set field="partyId" from-field="parameters.partyId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet id="AddPartyRatePanel" title="${uiLabelMap.PageTitleEditPartyRates}" collapsible="true">
+                            <include-form name="AddPartyRate" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+                        </screenlet>
+                        <include-form name="ListPartyRates" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="viewroles">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleViewPartyRole"/>
+                <set field="headerItem" value="find"/>
+                <set field="tabButtonItem" value="viewroles"/>
+                <set field="labelTitleProperty" value="PartyMemberRoles"/>
+                <entity-condition entity-name="RoleTypeAndParty" list-name="partyRoles">
+                    <condition-list combine="and">
+                        <condition-expr field-name="partyId" operator="equals" value="${parameters.partyId}"/>
+                        <condition-expr field-name="roleTypeId" operator="not-equals" value="_NA_"/>
+                        <condition-expr field-name="parentTypeId" operator="equals" value="PROJECT_TEAM"/>
+                    </condition-list>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.PartyMemberRoles}" navigation-form-name="ViewPartyRoles">
+                            <include-form name="ViewPartyRoles" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.PartyAddToRole}">
+                            <include-form name="AddPartyRole" location="component://projectmgr/widget/forms/ResourceForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ResourceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ResourceForms.xml?rev=704777&r1=704776&r2=704777&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ResourceForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ResourceForms.xml Tue Oct 14 21:13:54 2008
@@ -55,4 +55,14 @@
         <field name="roleTypeId"><hidden value="PROJECT_TEAM"/></field>
         <field name="addButton" ><submit/></field>
     </form>
+    <form name="AddPartyRole" extends="AddPartyRole" extends-resource="component://party/webapp/partymgr/party/PartyForms.xml">
+        <field name="roleTypeId">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="RoleType" description="${description}">
+                    <entity-constraint name="parentTypeId" operator="equals" value="PROJECT_TEAM"/>
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+    </form>
 </forms>
\ No newline at end of file