svn commit: r628593 - in /ofbiz/trunk/specialpurpose/projectmgr: webapp/projectmgr/WEB-INF/actions/ListProjects.bsh widget/Menus.xml widget/ProjectScreens.xml widget/TaskScreens.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: r628593 - in /ofbiz/trunk/specialpurpose/projectmgr: webapp/projectmgr/WEB-INF/actions/ListProjects.bsh widget/Menus.xml widget/ProjectScreens.xml widget/TaskScreens.xml widget/forms/ProjectForms.xml

hansbak-2
Author: hansbak
Date: Sun Feb 17 17:19:06 2008
New Revision: 628593

URL: http://svn.apache.org/viewvc?rev=628593&view=rev
Log:
make project find more standard using performfind service

Removed:
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjects.bsh
Modified:
    ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=628593&r1=628592&r2=628593&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Sun Feb 17 17:19:06 2008
@@ -175,13 +175,17 @@
     <menu name="ProjectSubTabBar" type="simple" menu-container-style="button-bar button-style-2" default-selected-style="selected">
         <actions>
             <set field="projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
+            <set field="hasUpdatePermission" value="${bsh:
+                result = dispatcher.runSync(&quot;projectMgrPermission&quot;,
+                org.ofbiz.base.util.UtilMisc.toMap(&quot;userLogin&quot;, parameters.get(&quot;userLogin&quot;),
+                &quot;resourceDescription&quot;, &quot;Project&quot;,
+                &quot;mainAction&quot;, &quot;UPDATE&quot;,
+                &quot;projectId&quot;, projectId));
+                return result.get(&quot;hasPermission&quot;); }" type="Boolean"/>
         </actions>
         <menu-item name="newProject" title="${uiLabelMap.ProjectMgrNewProject}">
             <condition>
                 <and>
-                    <not>
-                        <if-empty field-name="project"/>
-                    </not>
                     <if-compare field-name="hasUpdatePermission" operator="equals" value="true"/>
                 </and>
             </condition>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=628593&r1=628592&r2=628593&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Sun Feb 17 17:19:06 2008
@@ -19,7 +19,7 @@
 -->
 
 <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+ xsi:noNamespaceSchemaLocation="../../../framework/widget/dtd/widget-screen.xsd">
     <screen name="ListSubProjects">
         <section>            
             <actions>
@@ -27,9 +27,12 @@
                 <set field="tabButtonItem" value="subprojects"/>
                 <set field="labelTitleProperty" value="ProjectMgrProjectName"/>
                 <set field="projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
-                <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjects.bsh"/>
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
+                <entity-and entity-name="WorkEffort" list-name="projects">
+                    <field-map field-name="workEffortTypeId" value="PROJECT"/>
+                    <field-map field-name="workEffortParentId" env-name="projectId"/>
+                </entity-and>
             </actions>                                                
             <widgets>  
                 <decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
@@ -126,15 +129,14 @@
             <actions>
                 <set field="titleProperty" value="PageTitleFindProject"/>
                 <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"/>
-                <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjects.bsh"/>
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/>
             </actions>                                                
             <widgets>  
                 <decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
+                        <include-menu name="ProjectSubTabBar" location="component://projectmgr/widget/Menus.xml"/>
                         <screenlet name="findProject" collapsible="true" title="${uiLabelMap.PageTitleFindProject}">
                             <include-form name="FindProject" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
                         </screenlet>
@@ -771,10 +773,10 @@
     <screen name="SubProjectsInfo">
         <section>
             <actions>
-                <set field="parameters.projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
-                <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/FindProject.bsh"/>
+                <set field="projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
+                <set field="parameters.workEffortParentId" from-field="projectId" />
             </actions>
             <widgets>                
                 <container style="screenlet">

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=628593&r1=628592&r2=628593&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Sun Feb 17 17:19:06 2008
@@ -236,7 +236,7 @@
             <widgets>  
                 <decorator-screen name="CommonMyTaskDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">                                                                                                                
-                        <screenlet  title="${uiLabelMap.PageTitleFindTask}" collapsible="true" id="findTask">
+                        <screenlet  title="${uiLabelMap.PageTitleFindTask}" collapsible="true" id="findTask">
                             <include-form name="FindTask" location="component://projectmgr/widget/forms/TaskForms.xml"/>
                         </screenlet>
                         <section>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=628593&r1=628592&r2=628593&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Sun Feb 17 17:19:06 2008
@@ -17,8 +17,8 @@
     specific language governing permissions and limitations
     under the License.
 -->
-<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/widget-form.xsd">
     <form name="EditProject" type="single" target="updateProject" default-map-name="project"
         header-row-style="header-row" default-table-style="basic-table">
         <alt-target use-when="project==null" target="createProject"/>
@@ -101,9 +101,9 @@
     </form>
     <form name="FindProject" type="single" target="FindProject" title="Find and List Project"
         header-row-style="header-row" default-table-style="basic-table">
-        <field name="projectId" title="${uiLabelMap.ProjectMgrProjectId}"><text-find size="25" default-option="contains"></text-find></field>
-        <field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}"><text-find size="25" default-option="contains"></text-find></field>
-        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><date-time type="date"  /></field>
+        <field name="projectId" title="${uiLabelMap.ProjectMgrProjectId}" parameter-name="workEffortId"><text-find size="25" default-option="contains"></text-find></field>
+        <field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}" parameter-name="workEffortName"><text-find size="25" default-option="contains"></text-find></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDate}" parameter-name="createdStamp"><date-find/></field>
         <field name="find" title="${uiLabelMap.CommonFind}"><submit/></field>
     </form>
     <form name="hoursNotYetBilled" type="list" list-name="entryList"
@@ -117,20 +117,44 @@
         <field name="partyId"><display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName}"/></field>
         <field name="fromDate"><display type="date"/></field>
     </form>
-    <form name="ListProjects" type="list" list-name="projects" paginate-target="FindProject"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+    <form name="ListProjects" type="list" list-name="listIt" paginate-target="FindProject"
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <actions>
+            <set field="parameters.workEffortTypeId" value="PROJECT"/>
+            <service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
+                <field-map field-name="inputFields" env-name="parameters"/>
+                <field-map field-name="entityName" value="WorkEffort"/>
+                <field-map field-name="orderBy" value="lastStatusUpdate DESC"/>
+            </service>
+        </actions>
+        <row-actions>
+            <service service-name="getProject" result-map-name="result">
+                <field-map field-name="projectId" value="${workEffortId}"/>
+            </service>
+            <set field="projectName" from-field="result.projectInfo.projectName"/>
+            <set field="projectId" from-field="result.projectInfo.projectId"/>
+            <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 name="projectName" title="${uiLabelMap.ProjectMgrProjectName}" widget-style="buttontext">
-            <hyperlink also-hidden="false" description="${projectName}" target="projectView?projectId=${projectId}"/>
+            <hyperlink description="${projectName}" target="projectView?projectId=${projectId}"/>
         </field>
-        <field name="currentStatusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/></field>
-        <field name="priority" title="${uiLabelMap.CommonPriority}"><display/></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="plannedHours"><display/></field>
-        <field name="actualHours"><display/></field>
-        <field name="createdStamp"><display type="date"/></field>
+        <field name="currentStatusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/></field>
+        <field name="priority" title="${uiLabelMap.CommonPriority}"><display/></field>
+        <field name="estimatedStartDate" title="${uiLabelMap.FormFieldTitle_estimatedStartDate}"><display type="date"/></field>
+        <field name="estimatedCompletionDate" title="${uiLabelMap.FormFieldTitle_estimatedCompletionDate}"><display type="date"/></field>
+        <field name="actualStartDate" title="${uiLabelMap.FormFieldTitle_actualStartDate}"><display type="date"/></field>
+        <field name="actualCompletionDate" title="${uiLabelMap.FormFieldTitle_actualCompletionDate}"><display type="date"/></field>
+        <field name="plannedHours" title="${uiLabelMap.ProjectMgrPlannedHours}"><display/></field>
+        <field name="actualHours" title="${uiLabelMap.ProjectMgrActualHours}"><display/></field>
+        <field name="createdStamp" title="${uiLabelMap.FormFieldTitle_createdDate}"><display type="date"/></field>
     </form>                                        
     <form name="EditSubProjects" list-name="projects" type="list" target="RemoveSubProject"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">