Toggle order notes from public to private and back.

git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@448971 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Si Chen
2006-09-22 15:50:57 +00:00
parent 814c323c47
commit 55ba200527
5 changed files with 38 additions and 7 deletions
@@ -156,7 +156,7 @@ OrderNewDropShipmentForShipGroup = New Drop Shipment For Ship Group
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
@@ -578,6 +578,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
# ========================================
@@ -568,6 +568,16 @@ under the License.
<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">
@@ -350,6 +350,14 @@ under the License.
<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">
@@ -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"/>
@@ -47,16 +47,18 @@ under the License.
<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>