svn commit: r609537 - in /ofbiz/trunk/specialpurpose/projectmgr: webapp/projectmgr/WEB-INF/controller.xml widget/CommonScreens.xml widget/Menus.xml widget/ProjectScreens.xml widget/forms/ProjectForms.xml

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

svn commit: r609537 - in /ofbiz/trunk/specialpurpose/projectmgr: webapp/projectmgr/WEB-INF/controller.xml widget/CommonScreens.xml widget/Menus.xml widget/ProjectScreens.xml widget/forms/ProjectForms.xml

hansbak-2
Author: hansbak
Date: Mon Jan  7 01:19:23 2008
New Revision: 609537

URL: http://svn.apache.org/viewvc?rev=609537&view=rev
Log:
extended the resource manager within the projectmanager

Modified:
    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/forms/ProjectForms.xml

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=609537&r1=609536&r2=609537&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Mon Jan  7 01:19:23 2008
@@ -551,9 +551,28 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="ViewRequest"/>
     </request-map>
+    <!-- New 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"/>
+        <response name="error" type="view" value="listResourcesTask"/>
+    </request-map>
+    <request-map uri="listResourcesProject">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="listResourcesProject"/>
+        <response name="error" type="view" value="listResourcesProject"/>
+    </request-map>
     <!-- end of request mappings -->
 
     <!-- View Mappings -->
+    <view-map name="viewprofile" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#viewprofile"/>
+    <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="main" type="screen" page="component://projectmgr/widget/CommonScreens.xml#Main"/>
     <view-map name="ganttChart" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#ganttChart"/>    
     <view-map name="ListSubProjects" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#ListSubProjects"/>    

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml?rev=609537&r1=609536&r2=609537&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml Mon Jan  7 01:19:23 2008
@@ -348,6 +348,54 @@
                 </decorator-screen>
             </widgets>
         </section>
+    </screen>
+    <screen name="CommonListResourceDecorator">
+        <section>
+            <actions>
+                <set field="headerItem" value="resources"/>
+                <set field="partyId" from-field="parameters.partyId"/>
+                <entity-one entity-name="Party" value-name="party"/>
+                <entity-one entity-name="Person" value-name="lookupPerson"/>
+                <entity-one entity-name="PartyGroup" value-name="lookupGroup"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <!-- do check for PARTYMGR, _VIEW permission -->
+                            <condition>
+                                <if-has-permission permission="PROJECTMGR" action="_VIEW"/>
+                            </condition>
+                            <widgets>
+                                <section>
+                                    <condition><not><if-empty field-name="partyId"/></not></condition>
+                                    <widgets>
+                                        <include-menu location="component://projectmgr/widget/Menus.xml" name="ResourcesTabBar"/>
+                                        <container>
+                                            <section>
+                                                <widgets>
+                                                    <label text="&amp;nbsp;&lt;br/&gt;"/>
+                                                    <label style="head1" text="${uiLabelMap.PartyTheProfileOf} ${lookupPerson.personalTitle} ${lookupPerson.firstName} ${lookupPerson.middleName} ${lookupPerson.lastName} ${lookupPerson.suffix} ${lookupGroup.groupName}"/>
+                                                </widgets>
+                                                <fail-widgets>
+                                                    <label style="head1" text="${uiLabelMap.PartyNewUser}"/>
+                                                </fail-widgets>
+                                            </section>
+                                            
+                                            <label style="head1" text="[${partyId}]"/>
+                                        </container>
+                                    </widgets>
+                                </section>
+                                <decorator-section-include name="body"/>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="head3">${uiLabelMap.PartyMgrViewPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
     </screen>
 
 </screens>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=609537&r1=609536&r2=609537&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Mon Jan  7 01:19:23 2008
@@ -325,4 +325,15 @@
             <link target="StatustoComplete?timesheetId=${timesheet.timesheetId}&amp;statusId=TIMESHEET_COMPLETED"/>
         </menu-item>
     </menu>
+    <menu name="ResourcesTabBar" menu-container-style="button-bar tab-bar" default-menu-item-name="edittimesheet" default-selected-style="selected">
+        <menu-item name="ResourcesProfile" title="Profile">
+            <link target="viewprofile?partyId=${partyId}"/>
+        </menu-item>
+        <menu-item name="listResourcesProject" title="Project">
+            <link target="listResourcesProject?partyId=${partyId}"></link>
+        </menu-item>
+        <menu-item name="listResourcesTask"  title="Task">
+            <link target="listResourcesTask?partyId=${partyId}"></link>
+        </menu-item>
+    </menu>
 </menus>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=609537&r1=609536&r2=609537&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Mon Jan  7 01:19:23 2008
@@ -689,4 +689,110 @@
             </widgets>
         </section>
     </screen>
+    <screen name="viewprofile">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="ResourcesProfile"/>
+                <set field="titleProperty" value="PartyProfile"/>
+                <set field="headerItem" value="find"/>
+                <set field="labelTitleProperty" value="PartyTaxAuthInfos"/>
+                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/prototype.js" global="true"/>                
+                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/control.progress_bar.js" global="true"/>                
+                <set field="layoutSettings.styleSheets[]" value="/images/prototypejs/progress_bar.css" global="true"/>
+                <set field="layoutSettings.javaScripts[]" value="/partymgr/js/PartyProfileContent.js" global="true"/>                
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/viewprofile.bsh"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/getUserLoginPrimaryEmail.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <not><if-empty field-name="party"/></not>
+                            </condition>
+                            <widgets>
+                                <include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                <include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                <include-screen name="UserLogin" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                <include-screen name="Attributes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                <include-screen name="Visits" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                <include-screen name="ShipperAccount" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                <include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>                              
+                            </widgets>
+                            <fail-widgets>
+                                <container>
+                                    <label style="head3">${uiLabelMap.PartyNoPartyFoundWithPartyId}: ${parameters.partyId}</label>
+                                </container>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="listResourcesProject">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="listResourcesProject"/>
+                <set field="titleProperty" value="List Project by Party"/>
+                <set field="workEffortId" from-field="parameters.projectId"/>
+                <entity-and entity-name="WorkEffortAndPartyAssign" list-name="parties">
+                    <field-map field-name="workEffortTypeId" value="PROJECT"/>
+                    <field-map field-name="partyId" env-name="parameters.partyId"/>
+                    <order-by field-name="workEffortId"/>
+                </entity-and>
+            </actions>
+            <widgets>              
+                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>          
+                                <container style="screenlet">
+                                    <container style="screenlet-title-bar">
+                                        <label style="boxhead" text="">${uiLabelMap.PageTitleProjectInformation}</label>
+                                    </container>
+                                    <container style="screenlet-body">
+                                        <include-form name="listResourcesProjects" location="component://projectmgr/widget/forms/ProjectForms.xml"/>                                    
+                                    </container>
+                                </container>
+                            </widgets>
+                        </section>            
+                    </decorator-section>
+                </decorator-screen>  
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="listResourcesTask">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="listResourcesTask"/>
+                <set field="titleProperty" value="List Task by Party"/>
+                <set field="workEffortId" from-field="parameters.projectId"/>
+                <entity-and entity-name="ProjectAndPhaseAndTaskParty" list-name="tasks">
+                    <field-map field-name="partyId" env-name="parameters.partyId"/>
+                    <order-by field-name="workEffortId"/>
+                </entity-and>
+            </actions>
+            <widgets>  
+                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>                    
+                                <container style="screenlet">
+                                    <container style="screenlet-title-bar">
+                                        <label style="boxhead" text="">${uiLabelMap.PageTitleTaskInformation}</label>
+                                    </container>
+                                    <container style="screenlet-body">
+                                        <include-form name="listResourcesTasks" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
+                                    </container>
+                                </container>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>                  
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=609537&r1=609536&r2=609537&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Mon Jan  7 01:19:23 2008
@@ -406,4 +406,66 @@
         <field name="workEffortId"><hidden/></field>
         <field name="noteParty" title="${uiLabelMap.CommonBy}" widget-style="tabletext"><display description="${bsh:org.ofbiz.party.party.PartyHelper.getPartyName(delegator, noteParty, true)} at ${bsh: org.ofbiz.base.util.UtilDateTime.timeStampToString(noteDateTime, &quot;dd-MM-yyyy HH:mm&quot;, TimeZone.getDefault(), context.get(&quot;locale&quot;))}"/></field>
     </form>
+    <form name="listResourcesTasks" type="list" list-name="tasks" paginate-target="listResourcesTask">
+        <row-actions>
+            <service service-name="getProjectTask" result-map-name="result">
+                <field-map field-name="taskId" env-name="workEffortId"/>
+            </service>
+            <set field="currentStatusId" from-field="result.taskInfo.currentStatusId"/>
+            <set field="plannedHours" from-field="result.taskInfo.plannedHours"/>
+            <set field="actualHours" from-field="result.taskInfo.actualHours"/>
+        </row-actions>
+        <field entry-name="workEffortName" name="taskName" parameter-name="workEffortName" title="${uiLabelMap.CommonName}" widget-style="buttontext">
+            <hyperlink target="taskView?workEffortId=${workEffortId}" description="${workEffortName}[${workEffortId}]"/>
+        </field>
+        <field name="phaseName" title="phase name" widget-style="buttontext" widget-area-style="tabletextcenter">
+            <hyperlink target="FindPhase?projectId=${projectId}" description="${phaseName}"/>
+        </field>
+        <field name="projectName" title="project name" widget-style="buttontext">
+            <hyperlink target="projectView?projectId=${projectId}" description="${projectName}"/>
+        </field>
+        <field name="currentStatusId" title="${uiLabelMap.CommonStatus}">
+            <display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/>
+        </field>
+        <field name="workEffortId"><hidden value="${workEffortId}"/></field>
+        <field name="priority" title="${uiLabelMap.CommonPriority}" widget-area-style="tabletextcenter">
+            <display description="${priority}"/>
+        </field>      
+        <field name="estimatedStartDate" title="${uiLabelMap.WorkEffortEstimatedStartDate}" widget-area-style="tabletextcenter"><display type="date"/></field>
+        <field name="estimatedCompletionDate" title="${uiLabelMap.WorkEffortEstimatedCompletionDate}" widget-area-style="tabletextcenter"><display type="date"/></field>
+        <field name="actualStartDate" title="${uiLabelMap.ProjectMgrWorkEffortActualStartDate}" widget-area-style="tabletextcenter"><display type="date"/></field>
+        <field name="actualCompletionDate" title="${uiLabelMap.ProjectMgrWorkEffortActualCompletionDate}" widget-area-style="tabletextcenter"><display type="date"/></field>
+        <field name="plannedHours" widget-area-style="tabletextcenter"><display/></field>
+        <field name="actualHours" widget-area-style="tabletextcenter"><display/></field>
+    </form>
+    <form name="listResourcesProjects" type="list" list-name="parties" default-title-style="tableheadtext">
+        <row-actions>
+            <service service-name="getProject" result-map-name="result">
+                <field-map field-name="projectId" env-name="workEffortId"/>
+            </service>
+            <set field="currentStatusId" from-field="result.projectInfo.currentStatusId"/>
+            <set field="Priority" from-field="result.projectInfo.priority"/>
+            <set field="plannedHours" from-field="result.projectInfo.plannedHours"/>
+            <set field="actualHours" from-field="result.projectInfo.actualHours"/>
+            <set field="CreatedStamp" from-field="result.projectInfo.createdStamp"/>
+            <set field="EstimatedStartDate" from-field="result.projectInfo.estimatedStartDate"/>
+            <set field="EstimatedCompletionDate" from-field="result.projectInfo.estimatedCompletionDate"/>
+            <set field="ActualStartDate" from-field="result.projectInfo.actualStartDate"/>
+            <set field="ActualCompletionDate" from-field="result.projectInfo.actualCompletionDate"/>
+        </row-actions>
+        <field entry-name="workEffortName" name="projectName" parameter-name="workEffortName" title="${uiLabelMap.CommonName}" widget-style="buttontext">
+            <hyperlink target="projectView?projectId=${workEffortId}" description="${workEffortName}[${workEffortId}]"/>
+        </field>
+        <field name="currentStatusId" title="${uiLabelMap.CommonStatus}">
+            <display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/>
+        </field>
+        <field name="Priority" widget-area-style="tabletextcenter"><display description="${Priority}"/></field>
+        <field name="EstimatedStartDate" widget-area-style="tabletextcenter"><display type="date"/></field>
+        <field name="EstimatedCompletionDate" widget-area-style="tabletextcenter"><display  type="date"/></field>
+        <field name="ActualStartDate" title="startDate"><display type="date"/></field>
+        <field name="ActualCompletionDate" title="completionDate"><display type="date"/></field>
+        <field name="plannedHours" widget-area-style="tabletextcenter"><display/></field>
+        <field name="actualHours" widget-area-style="tabletextcenter"><display/></field>
+        <field name="CreatedStamp" title="CreatedStamp"><display type="date"/></field>
+    </form>
 </forms>