svn commit: r451126 - in /incubator/ofbiz/trunk/applications/workeffort: config/ script/org/ofbiz/workeffort/workeffort/ servicedef/ webapp/workeffort/WEB-INF/ widget/

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

svn commit: r451126 - in /incubator/ofbiz/trunk/applications/workeffort: config/ script/org/ofbiz/workeffort/workeffort/ servicedef/ webapp/workeffort/WEB-INF/ widget/

jleroux@apache.org
Author: jleroux
Date: Thu Sep 28 22:14:22 2006
New Revision: 451126

URL: http://svn.apache.org/viewvc?view=rev&rev=451126
Log:
A patch from Ashish Vijaywargiya : new Work Effort Note Forms/Screens (https://issues.apache.org/jira/browse/OFBIZ-339)

Modified:
    incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties
    incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
    incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml
    incubator/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml
    incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
    incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml
    incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml

Modified: incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties?view=diff&rev=451126&r1=451125&r2=451126
==============================================================================
--- incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties (original)
+++ incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties Thu Sep 28 22:14:22 2006
@@ -86,6 +86,9 @@
 PageTitleCalendarMonth=Calendar Month
 PageTitleCalendarUpcoming=Calendar Upcoming
 
+PageTitleListWorkEffortNotes = Work Effort Notes
+PageTitleAddWorkEffortNotes = Add Work Effort Notes
+
 PartyAddressLine1=Address Line 1
 PartyAddressLine2=Address Line 2
 PartyAddContactInformationParty=Add this contact information to party
@@ -321,6 +324,8 @@
 WorkEffortWorkflowActivitiesUser=Workflow activities assigned to user
 WorkEffortWorkflowActivitiesUserGroup=Workflow activities assigned to User Group
 WorkEffortWorkflowActivitiesUserRole=Workflow activities assigned to User Role
+
+WorkEffortNotes = Notes
 
 FormFieldTitle_workEffortId=Work Effort Id
 FormFieldTitle_priority=Priority

Modified: incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml?view=diff&rev=451126&r1=451125&r2=451126
==============================================================================
--- incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml (original)
+++ incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml Thu Sep 28 22:14:22 2006
@@ -519,7 +519,12 @@
         <sequenced-id-to-env sequence-name="NoteData" env-name="newEntity.noteId"/>
         <field-to-result field-name="newEntity.noteId" result-name="noteId"/>
         <set from-field="parameters.noteInfo" field="newEntity.noteInfo"/>
-        <set from-field="parameters.noteParty" field="newEntity.noteParty"/>
+        <if-not-empty field-name="parameters.noteParty">
+           <set from-field="parameters.noteParty" field="newEntity.noteParty"/>
+        <else>
+            <set field="newEntity.noteParty" from-field="parameters.userLogin.userLoginId"></set>
+        </else>    
+        </if-not-empty>
         <set from-field="parameters.noteName" field="newEntity.noteName"/>
         <now-timestamp-to-env env-name="newEntity.noteDateTime"/>
         <create-value value-name="newEntity"/>

Modified: incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml?view=diff&rev=451126&r1=451125&r2=451126
==============================================================================
--- incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml (original)
+++ incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml Thu Sep 28 22:14:22 2006
@@ -106,7 +106,7 @@
         <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
     </service>
     <service name="createWorkEffortNote" engine="simple"
-            location="org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" invoke="createWorkEffortNote">
+            location="org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" invoke="createWorkEffortNote" auth="true">
         <description>Create a WorkEffort Note</description>
         <attribute name="workEffortId" type="String" mode="IN" optional="false"/>
         <attribute name="noteInfo" type="String" mode="IN" optional="false"/>

Modified: incubator/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml?view=diff&rev=451126&r1=451125&r2=451126
==============================================================================
--- incubator/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml (original)
+++ incubator/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml Thu Sep 28 22:14:22 2006
@@ -432,6 +432,19 @@
         <response name="error" type="view" value="EditTimesheetEntries"/>
     </request-map>
     
+    <!-- WorkEffort Note Requests -->
+    <request-map uri="EditWorkEffortNotes">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditWorkEffortNotes"/>
+    </request-map>
+    
+    <request-map uri="createWorkEffortNote">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createWorkEffortNote"/>
+        <response name="success" type="view" value="EditWorkEffortNotes"/>
+        <response name="error" type="view" value="EditWorkEffortNotes"/>
+    </request-map>
+    
     <!-- Lookup request mappings -->
     <request-map uri="LookupWorkEffort"><security https="true" auth="true"/><response name="success" type="view" value="LookupWorkEffort"/></request-map>
     <request-map uri="LookupTimesheet"><security https="true" auth="true"/><response name="success" type="view" value="LookupTimesheet"/></request-map>
@@ -502,6 +515,8 @@
     <view-map name="EditTimesheet" type="screen" page="component://workeffort/widget/TimesheetScreens.xml#EditTimesheet"/>
     <view-map name="EditTimesheetRoles" type="screen" page="component://workeffort/widget/TimesheetScreens.xml#EditTimesheetRoles"/>
     <view-map name="EditTimesheetEntries" type="screen" page="component://workeffort/widget/TimesheetScreens.xml#EditTimesheetEntries"/>
+    
+    <view-map name="EditWorkEffortNotes" type="screen" page="component://workeffort/widget/WorkEffortScreens.xml#EditWorkEffortNotes"/>
     
     <view-map name="LookupWorkEffort" type="screen" page="component://workeffort/widget/LookupScreens.xml#LookupWorkEffort"/>
     <view-map name="LookupTimesheet" type="screen" page="component://workeffort/widget/LookupScreens.xml#LookupTimesheet"/>

Modified: incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?view=diff&rev=451126&r1=451125&r2=451126
==============================================================================
--- incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml (original)
+++ incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml Thu Sep 28 22:14:22 2006
@@ -740,4 +740,33 @@
         <field name="partyId" title="${uiLabelMap.WorkEffortTimeBillToParty}"><lookup target-form-name="LookupPartyName" default-value="${timesheet.clientPartyId}"/></field>
         <field name="submitButton" title="${uiLabelMap.PageTitleAddWorkEffortTimeToNewInvoice}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
+    
+    <!-- WorkEffort Note -->
+    <form name="ListWorkEffortNotes" type="list" list-name="workEffortNotes"
+        default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+        <actions>
+            <entity-condition entity-name="WorkEffortNoteAndData">
+                <condition-expr field-name="workEffortId" env-name="workEffortId"/>
+                <order-by field-name="noteId"/>
+            </entity-condition>
+        </actions>
+        <field name="noteId" widget-style="tabletext"><display/></field>
+        <field name="workEffortId" entity-name="WorkEffort" widget-style="buttontext">
+           <hyperlink target="EditWorkEffort?workEffortId=${workEffortId}" also-hidden="false" description="${workEffortId}"/>
+        </field>
+        <field name="noteInfo" title="${uiLabelMap.CommonNote}" widget-style="tabletext"><display/></field>
+        <field name="noteParty" title="${uiLabelMap.CommonBy}" widget-style="tabletext"><display description="${bsh:org.ofbiz.party.party.PartyHelper.getPartyName(delegator, noteParty, true)} at ${noteDateTime}"/></field>
+    </form>
+    
+    <form name="AddWorkEffortNote" type="single" target="createWorkEffortNote" title=""
+        default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+        <auto-fields-service service-name="createWorkEffortNote"/>
+        <field name="noteId"><ignored/><!-- don't pass, will be sequenced --></field>
+        <field name="workEffortId"><hidden/></field>
+        <field name="noteInfo" title="${uiLabelMap.OrderNote}"><textarea cols="70" rows="5" /></field>
+        <field name="noteParty"><hidden/></field>
+        <field name="noteName"><hidden/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    
 </forms>

Modified: incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml?view=diff&rev=451126&r1=451125&r2=451126
==============================================================================
--- incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml (original)
+++ incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml Thu Sep 28 22:14:22 2006
@@ -77,5 +77,8 @@
         <menu-item name="WorkEffortTimeEntries" title="${uiLabelMap.TimesheetTimeEntries}">
             <link target="EditWorkEffortTimeEntries?workEffortId=${workEffortId}"/>
         </menu-item>
+        <menu-item name="WorkEffortNotes" title="${uiLabelMap.WorkEffortNotes}">
+            <link target="EditWorkEffortNotes?workEffortId=${workEffortId}"/>
+        </menu-item>
     </menu>
 </menus>

Modified: incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml?view=diff&rev=451126&r1=451125&r2=451126
==============================================================================
--- incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml (original)
+++ incubator/ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml Thu Sep 28 22:14:22 2006
@@ -483,4 +483,25 @@
             </widgets>
         </section>
     </screen>
+    
+    <screen name="EditWorkEffortNotes">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleListWorkEffortNotes"/>
+                <set field="tabButtonItem" value="WorkEffortNotes"/>
+                <set field="labelTitleProperty" value="PageTitleListWorkEffortNotes"/>
+                <set field="workEffortId" from-field="parameters.workEffortId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonWorkEffortDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container><label style="head1">${uiLabelMap.PageTitleListWorkEffortNotes}</label></container>
+                        <include-form name="ListWorkEffortNotes" location="component://workeffort/widget/WorkEffortForms.xml"/>
+                        <container><label style="head1">${uiLabelMap.PageTitleAddWorkEffortNotes}</label></container>
+                        <include-form name="AddWorkEffortNote" location="component://workeffort/widget/WorkEffortForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>