svn commit: r448971 - in /incubator/ofbiz/trunk/applications/order: config/OrderUiLabels.properties script/org/ofbiz/order/order/OrderServices.xml servicedef/services.xml webapp/ordermgr/WEB-INF/controller.xml webapp/ordermgr/order/ordernotes.ftl

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

svn commit: r448971 - in /incubator/ofbiz/trunk/applications/order: config/OrderUiLabels.properties script/org/ofbiz/order/order/OrderServices.xml servicedef/services.xml webapp/ordermgr/WEB-INF/controller.xml webapp/ordermgr/order/ordernotes.ftl

sichen
Author: sichen
Date: Fri Sep 22 08:50:57 2006
New Revision: 448971

URL: http://svn.apache.org/viewvc?view=rev&rev=448971
Log:
Toggle order notes from public to private and back.

Modified:
    incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties
    incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml
    incubator/ofbiz/trunk/applications/order/servicedef/services.xml
    incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
    incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordernotes.ftl

Modified: incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties?view=diff&rev=448971&r1=448970&r2=448971
==============================================================================
--- incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties (original)
+++ incubator/ofbiz/trunk/applications/order/config/OrderUiLabels.properties Fri Sep 22 08:50:57 2006
@@ -156,7 +156,7 @@
 OrderNewShipmentForShipGroup = New Shipment For Ship Group
 OrderNoChannel = No Channel
 OrderNoGiftWrap = No Gift Wrap
-OrderNoNotes = No notes for this order.
+OrderNoNotes = No notes for this order
 OrderNoNotesForThisRequestItem = No Notes For This Request Item
 OrderNoOrderAdjustments=No adjustments on this order.
 OrderNoOrderFound = No Order Found
@@ -577,6 +577,10 @@
 OrderSendConfirmationEmailBCCTo=BCC To
 OrderSendConfirmationEmailBody=Body
 OrderSendConfirmationEmailContentType=Content-Type
+
+OrderNotesPrivate = Make Private
+OrderNotesPublic = Make Public
+OrderSecurityErrorToRunUpdateOrderNote = Error in toggling notes to Private/Public
 
 # ========================================
 # org.ofbiz.order.order messages

Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?view=diff&rev=448971&r1=448970&r2=448971
==============================================================================
--- incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original)
+++ incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml Fri Sep 22 08:50:57 2006
@@ -568,6 +568,16 @@
         <entity-one entity-name="OrderContactMech" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
+    
+    <simple-method method-name="updateOrderNote" short-description="Update OrderNote">
+        <check-permission permission="ORDERMGR" action="_UPDATE">
+            <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunUpdateOrderNote"/>
+        </check-permission>
+        <check-errors/>
+        <entity-one entity-name="OrderHeaderNote" value-name="orderHeaderNote"/>
+        <set-nonpk-fields value-name="orderHeaderNote" map-name="parameters"/>
+        <store-value value-name="orderHeaderNote"/>  
+    </simple-method>
         
     <simple-method method-name="createOrderTerm" short-description="Create an OrderTerm">
         <check-permission permission="ORDERMGR" action="_CREATE">

Modified: incubator/ofbiz/trunk/applications/order/servicedef/services.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/servicedef/services.xml?view=diff&rev=448971&r1=448970&r2=448971
==============================================================================
--- incubator/ofbiz/trunk/applications/order/servicedef/services.xml (original)
+++ incubator/ofbiz/trunk/applications/order/servicedef/services.xml Fri Sep 22 08:50:57 2006
@@ -350,6 +350,14 @@
         <attribute name="internalNote" type="String" mode="IN"/>
     </service>
 
+    <service name="updateOrderNote" engine="simple" default-entity-name="OrderHeaderNote"
+            location="org/ofbiz/order/order/OrderServices.xml" invoke="updateOrderNote" auth="true">
+        <description>Toggle Order Note and make it either Public or Private</description>
+        <attribute name="orderId" type="String" mode="IN" optional="false"/>
+        <attribute name="noteId" type="String" mode="IN" optional="false"/>
+        <attribute name="internalNote" type="String" mode="IN" optional="false"/>
+    </service>
+
     <!-- Order (digital) Fulfillment Services -->
     <service name="checkDigitalItemFulfillment" engine="java"
             location="org.ofbiz.order.order.OrderServices" invoke="checkDigitalItemFulfillment" auth="true">

Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?view=diff&rev=448971&r1=448970&r2=448971
==============================================================================
--- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Fri Sep 22 08:50:57 2006
@@ -330,6 +330,13 @@
         <response name="error" type="view" value="ListOrderTerms"/>
     </request-map>
 
+    <request-map uri="updateOrderNote">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateOrderNote"/>
+        <response name="success" type="request-redirect" value="orderview"/>
+        <response name="error" type="view" value="orderview"/>
+    </request-map>
+    
     <!-- Order Entry Requests -->
     <request-map uri="orderentry">
         <security https="true" auth="true"/>

Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordernotes.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordernotes.ftl?view=diff&rev=448971&r1=448970&r2=448971
==============================================================================
--- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordernotes.ftl (original)
+++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordernotes.ftl Fri Sep 22 08:50:57 2006
@@ -47,16 +47,18 @@
                     <div class="tabletext">&nbsp;<b>${uiLabelMap.CommonBy}: </b>${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator, note.noteParty, true)}</div>
                     <div class="tabletext">&nbsp;<b>${uiLabelMap.CommonAt}: </b>${note.noteDateTime?string?if_exists}</div>
                   </td>
-                  <td align="left" valign="top" width="55%">
+                  <td align="left" valign="top" width="50%">
                     <div class="tabletext">${note.noteInfo?if_exists}</div>
                   </td>
-                  <td align="right" valign="top" width="10%">
- <#if note.internalNote?if_exists == "N">
+                  <td align="right" valign="top" width="15%">
+                    <#if note.internalNote?if_exists == "N">
                     <div class="tabletext">${uiLabelMap.OrderPrintableNote}</div>
-                </#if>    
- <#if note.internalNote?if_exists == "Y">
+                      <a href="<@ofbizUrl>updateOrderNote?orderId=${orderId}&noteId=${note.noteId}&internalNote=Y</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderNotesPrivate}</a>
+                    </#if>    
+                    <#if note.internalNote?if_exists == "Y">
                     <div class="tabletext">${uiLabelMap.OrderNotPrintableNote}</div>
-                </#if>    
+                      <a href="<@ofbizUrl>updateOrderNote?orderId=${orderId}&noteId=${note.noteId}&internalNote=N</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderNotesPublic}</a>
+                    </#if>    
                   </td>
                 </tr>
                 <#if note_has_next>