Author: hansbak
Date: Wed Oct 22 23:13:39 2008 New Revision: 707285 URL: http://svn.apache.org/viewvc?rev=707285&view=rev Log: add the forward function, attached filelist to an email including security Added: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy (with props) Modified: ofbiz/trunk/applications/party/data/PartySecurityData.xml ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/mypage/webapp/mypage/addAttachFile.ftl ofbiz/trunk/specialpurpose/mypage/webapp/mypage/attachFileList.ftl ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Modified: ofbiz/trunk/applications/party/data/PartySecurityData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/data/PartySecurityData.xml?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/applications/party/data/PartySecurityData.xml (original) +++ ofbiz/trunk/applications/party/data/PartySecurityData.xml Wed Oct 22 23:13:39 2008 @@ -44,6 +44,8 @@ <SecurityPermission description="Update communication event, any from/to party." permissionId="PARTYMGR_CME_UPDATE"/> <SecurityPermission description="Delete communication event, any from/to party." permissionId="PARTYMGR_CME_DELETE"/> <SecurityPermission description="Can create Email communication events for logged-in user." permissionId="PARTYMGR_CME-EMAIL_CREATE"/> + <SecurityPermission description="Can update Email communication events for logged-in user." permissionId="PARTYMGR_CME-EMAIL_UPDATE"/> + <SecurityPermission description="Can delete Email communication events for logged-in user." permissionId="PARTYMGR_CME-EMAIL_DELETE"/> <SecurityPermission description="Can create Internal note communication event for logged-in user." permissionId="PARTYMGR_CME-NOTE_CREATE"/> <SecurityGroup description="Party Admin group, has all party permissions." groupId="PARTYADMIN"/> Added: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy?rev=707285&view=auto ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy (added) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy Wed Oct 22 23:13:39 2008 @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.*; +import java.lang.*; +import java.lang.String; +import org.ofbiz.base.util.*; + + +originalCommEventId = parameters.originalCommEventId; + +if (originalCommEventId) { + originalEvent = delegator.findByPrimaryKey("CommunicationEvent", ["communicationEventId" : originalCommEventId]); + if (originalEvent) { + orgEventId = originalEvent.origCommEventId ? originalEvent.origCommEventId : originalCommEventId; + parameters.communicationEventTypeId = originalEvent.communicationEventTypeId; + parameters.origCommEventId = orgEventId; + parameters.originalCommEventId = originalCommEventId; + parameters.contactMechIdFrom = originalEvent.contactMechIdTo; + parameters.partyIdFrom = userLogin.partyId; + parameters.statusId = "COM_IN_PROGRESS"; + + parameters.subject = "FW: " + originalEvent.subject; + headcontent = "\n\n\n ________________________" + "\n" + + " > From: " + originalEvent.partyIdFrom + "\n" + + " > To: " + originalEvent.partyIdTo + "\n" + + " > Subject: " + originalEvent.subject + "\n" + + " > Date: " + originalEvent.entryDate + "\n >"; + bodycontent = originalEvent.content.toString(); + if (bodycontent) { + int ix = -1; + body = ""; + if (bodycontent.indexOf('\n') != -1){ + while ((ix = bodycontent.indexOf('\n')) != -1) { + bodycontent = bodycontent.replace('\n',' > '); + if (bodycontent != body){ + body = body + bodycontent; + } + } + }else{ + body = bodycontent; + } + } + parameters.content = headcontent + "\n > " + body; + } +} \ No newline at end of file Propchange: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy Wed Oct 22 23:13:39 2008 @@ -39,4 +39,4 @@ parameters.subject = "RE: " + parentEvent.subject; parameters.content = "\n\n\n--------------- In reply to:\n\n" + parentEvent.content; } -} \ No newline at end of file +} Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Wed Oct 22 23:13:39 2008 @@ -143,7 +143,8 @@ <field name="donePage"><hidden/></field> <field name="communicationEventTypeId"><hidden value="AUTO_EMAIL_COMM"/></field> <field name="statusId"><hidden value="COM_IN_PROGRESS"/></field> - <field name="parentCommEventId"><hidden value="${parameters.parentCommEventId}"/></field> + <field name="parentCommEventId" use-when="parentCommEventId != null"><hidden value="${parameters.parentCommEventId}"/></field> + <field name="parentCommEventId" use-when="originalCommEventId != null"><hidden value="${parameters.originalCommEventId}"/></field> <field name="partyIdFrom"><hidden value="${userLogin.partyId}"/></field> <field name="emailAddress" parameter-name="contactMechIdFrom"> <drop-down> @@ -154,9 +155,9 @@ <lookup target-form-name="LookupPartyEmail"/> </field> <field name="datetimeStarted" title="${uiLabelMap.CommonSendDate}"><date-time/></field> - <field name="subject"><text size="60"/></field> + <field name="subject"><text size="60" default-value="${parameters.subject}"/></field> <field name="contentMimeTypeId"><hidden value="text/plain"/></field> - <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="80" rows="20"/></field> + <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="80" rows="20" default-value="${parameters.content}"/></field> <field name="sendButton"><submit button-type="button"/></field> </form> <form name="ViewEmail" type="single" default-map-name="communicationEvent"> @@ -203,9 +204,9 @@ <list-options list-name="recentParties" key-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"/> </drop-down> </field> - <field name="subject"><text size="60"/></field> + <field name="subject"><text size="60" default-value="${parameters.subject}"/></field> <field name="contentMimeTypeId"><hidden value="text/plain"/></field> - <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10"/></field> + <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10" default-value="${parameters.content}"/></field> <field name="sendButton"><submit button-type="button"/></field> </form> Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml Wed Oct 22 23:13:39 2008 @@ -89,6 +89,16 @@ </condition> <link target="EditCommunicationEvent?parentCommEventId=${parameters.communicationEventId}"/> </menu-item> + <menu-item name="forward" title="${uiLabelMap.Forward}"> + <condition> + <and> + <not><if-empty field-name="parameters.communicationEventId"/></not> + <not><if-empty field-name="communicationEvent.partyIdFrom"/></not> + <if-compare field-name="communicationEvent.partyIdFrom" operator="not-equals" value="${userLogin.partyId}"/> + </and> + </condition> + <link target="EditCommunicationEvent?originalCommEventId=${parameters.communicationEventId}"/> + </menu-item> <menu-item name="createRequestFromCommEvent" title="${uiLabelMap.PartyCreateRequestFromCommEvent}"> <condition> <and> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml Wed Oct 22 23:13:39 2008 @@ -311,6 +311,7 @@ <set field="tabButtonItem" value="CommunicationEvent" /> <entity-one entity-name="CommunicationEvent" value-name="communicationEvent" /> <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy"/> + <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy"/> </actions> <widgets> <decorator-screen name="CommonCommunicationEventDecorator" Modified: ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/data/MyPageSecurityData.xml Wed Oct 22 23:13:39 2008 @@ -28,13 +28,17 @@ <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="PROJECTMGR_ROLE_TIMESHEET_CREATE"/> <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="PROJECTMGR_ROLE_TIMESHEET_UPDATE"/> <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="PARTYMGR_CME_UPDATE"/> + <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="PARTYMGR_CME_CREATE"/> <!-- be able to create internal notes and email--> <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="PARTYMGR_CME-EMAIL_CREATE"/> + <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="PARTYMGR_CME-EMAIL_UPDATE"/> <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="PARTYMGR_CME-NOTE_CREATE"/> - <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="PARTYMGR_CME-NOTE_CREATE"/> + <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="PARTYMGR_VIEW"/> <!-- and can create customer request from emails --> <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="ORDERMGR_CRQ_CREATE"/> - + <!-- and can upload content for email --> + <SecurityGroupPermission groupId="MYPAGE_EMPLOYEE" permissionId="CONTENTMGR_ROLE_CREATE"/> + <SecurityPermission permissionId="MYPAGE_EMPL-NOEMAIL" description="Usage of the employee screens in mypage: projectmanager and internal notes."/> <SecurityGroup description="Employee user of mypage, Limited access to the projectmgr and comms, custReq, no email" groupId="MYPAGE_EMPL-NOEMAIL"/> <SecurityGroupPermission groupId="MYPAGE_EMPL-NOEMAIL" permissionId="MYPAGE_EMPLOYEE"/> @@ -44,8 +48,9 @@ <SecurityGroupPermission groupId="MYPAGE_EMPL-NOEMAIL" permissionId="PROJECTMGR_ROLE_TIMESHEET_CREATE"/> <SecurityGroupPermission groupId="MYPAGE_EMPL-NOEMAIL" permissionId="PROJECTMGR_ROLE_TIMESHEET_UPDATE"/> <SecurityGroupPermission groupId="MYPAGE_EMPL-NOEMAIL" permissionId="PARTYMGR_CME-NOTE_CREATE"/> + <SecurityGroupPermission groupId="MYPAGE_EMPL-NOEMAIL" permissionId="PARTYMGR_CME_CREATE"/> <SecurityGroupPermission groupId="MYPAGE_EMPL-NOEMAIL" permissionId="PARTYMGR_CME_UPDATE"/> - + <SecurityPermission permissionId="MYPAGE_CUSTOMER" description="Use the customer screens in mypage."/> <SecurityGroup description="Customer user of mypage, Limited access to own custRequests, and project" groupId="MYPAGE_CUSTOMER"/> <SecurityGroupPermission groupId="MYPAGE_CUSTOMER" permissionId="PARTYMGR_CME-NOTE_CREATE"/><!-- allow customer to read/write internal notes --> Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Wed Oct 22 23:13:39 2008 @@ -231,6 +231,13 @@ <response name="success" type="view" value="EditCommunicationEvent"/> </request-map> + <request-map uri="updateCommunicationEvent"> + <security https="true" auth="true"/> + <event type="service" invoke="updateCommunicationEvent"/> + <response name="success" type="view" value="main"/> + <response name="error" type="view" value="ViewCommunicationEvent"/> + </request-map> + <request-map uri="addAttachmentEmail"> <security https="true" auth="true"/> <response name="success" type="view" value="addAttachmentEmail"/> Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/addAttachFile.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/addAttachFile.ftl?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/addAttachFile.ftl (original) +++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/addAttachFile.ftl Wed Oct 22 23:13:39 2008 @@ -3,14 +3,14 @@ <h3>Attach File</h3> </div> <div class="screenlet-body"> - ${screens.render("component://mypage/widget/MyPageScreens.xml#AttachFiletList")} - <hr/> <div class="label">${uiLabelMap.Content}</div> <form id="content2comevent" method="post" enctype="multipart/form-data" action="<@ofbizUrl>addContentToCommEvent</@ofbizUrl>" name="content2comevent"> <input type="hidden" name="partyId" value="${partyId}" id="contentPartyId"/> <input type="hidden" name="communicationEventId" value="${communicationEventId}"/> <input type="hidden" name="partyContentTypeId" value="USERDEF"/> <input type="hidden" name="communicationEventTypeId" value="${communicationEventTypeId}"/> + <input type="hidden" name="parentCommEventId" value="${parameters.parentCommEventId?if_exists}"/> + <input type="hidden" name="originalCommEventId" value="${parameters.originalCommEventId?if_exists}"/> <input type="text" size="25" name="contentId"/> <a href="javascript:call_fieldlookup2(document.content2comevent.contentId,'LookupContent');"> <img width="15" height="14" border="0" alt="Lookup" src="/images/fieldlookup.gif"/> @@ -28,6 +28,8 @@ <input type="hidden" name="roleTypeId" value="CONTENT"/> <input type="hidden" name="communicationEventId" value="${communicationEventId}"/> <input type="hidden" name="communicationEventTypeId" value="${communicationEventTypeId}"/> + <input type="hidden" name="parentCommEventId" value="${parameters.parentCommEventId?if_exists}"/> + <input type="hidden" name="originalCommEventId" value="${parameters.originalCommEventId?if_exists}"/> <input type="file" name="uploadedFile" size="25" id="uploadedFile"/> <input type="submit" value="${uiLabelMap.CommonUpload}"/><br><br> Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/attachFileList.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/attachFileList.ftl?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/attachFileList.ftl (original) +++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/attachFileList.ftl Wed Oct 22 23:13:39 2008 @@ -1,29 +1,37 @@ <div id="partyContentList"> - + <div class="screenlet-title-bar"> + <h3>Attached file</h3> + </div> + <div class="screenlet-body"> <#if commEventContent?has_content> <table class="basic-table" cellspacing="0"> <#list commEventContent as commContent> <#list partyContent as pContent> <#assign partyId = pContent.partyId/> <#if commContent.contentId == pContent.contentId> - <#assign content = pContent.getRelatedOne("Content")> + <#assign content = pContent.getRelatedOne("Content")> <#assign fromDate = commContent.fromDate> - <#assign ptype = pContent.partyContentTypeId> + <#assign ptype = pContent.partyContentTypeId/> </#if> </#list> <tr> - <td width="30%"><#if (content.contentName?has_content)> + <td width="30%"> + <#if content?has_content> + <#if (content.contentName?has_content)> <a href="<@ofbizUrl>img/${content.contentName}?imgId=${content.dataResourceId}</@ofbizUrl>" target="blank"> ${content.contentName?if_exists}</a> - </#if></td> - <td class="button-col" width="20%"> - <a href="<@ofbizUrl>removeAttachFile/EditCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION&communicationEventId=${commContent.communicationEventId}&contentId=${commContent.contentId}&fromDate=${fromDate}</@ofbizUrl>">${uiLabelMap.CommonRemove}</a> + </#if> + </#if> + </td> + <td class="button-col" width="20%"> + <a href="<@ofbizUrl>removeAttachFile/EditCommunicationEvent?partyId=${partyId}&communicationEventTypeId=EMAIL_COMMUNICATION&communicationEventId=${commContent.communicationEventId}&contentId=${commContent.contentId}&fromDate=${fromDate}</@ofbizUrl>">${uiLabelMap.CommonRemove}</a> </td> - <td width="20%">${commContent.fromDate?if_exists}</td> - <td width="30%"> </td> + <td width="20%">${commContent.fromDate?if_exists}</td> + <td width="30%"> </td> </tr> </#list> </table> <#else> ${uiLabelMap.PartyNoContent} </#if> + </div> </div> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Wed Oct 22 23:13:39 2008 @@ -224,7 +224,7 @@ </entity-condition> </actions> <field name="subject"> - <hyperlink description="${subject}" target="EditCommunicationEvent?communicationEventId=${communicationEventId}&communicationEventTypeId=EMAIL_COMMUNICATION"/> + <hyperlink description="${subject}" target="EditCommunicationEvent?communicationEventId=${communicationEventId}&communicationEventTypeId=EMAIL_COMMUNICATION&partyId=${userLogin.partyId}"/> </field> <field name="removeLink" title="${uiLabelMap.CommonDelete}" widget-style="smallSubmit"> <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deletePartyCommunicationEvent?partyId=${partyId}&communicationEventId=${communicationEventId}"/> @@ -259,7 +259,8 @@ <field name="communicationEventId" use-when="communicationEventId!=null"><hidden/></field> <field name="communicationEventTypeId"><hidden value="AUTO_EMAIL_COMM"/></field> <field name="statusId"><hidden value="COM_IN_PROGRESS"/></field> - <field name="parentCommEventId"><hidden value="${parameters.parentCommEventId}"/></field> + <field name="parentCommEventId" use-when="parentCommEventId != null"><hidden value="${parameters.parentCommEventId}"/></field> + <field name="parentCommEventId" use-when="originalCommEventId != null"><hidden value="${parameters.originalCommEventId}"/></field> <field name="partyIdFrom"><hidden value="${userLogin.partyId}"/></field> <field name="emailAddress" parameter-name="contactMechIdFrom"> <drop-down> @@ -270,18 +271,19 @@ <lookup target-form-name="LookupPartyEmail"/> </field> <field name="datetimeStarted" title="${uiLabelMap.CommonSendDate}"><date-time/></field> - <field name="subject"><text size="60"/></field> + <field name="subject"><text size="60" default-value="${parameters.subject}"/></field> <field name="fileAttach"><display/></field><field name="fileAttach"> - <hyperlink target="addAttachmentEmail?communicationEventTypeId=${parameters.communicationEventTypeId}&partyId=${userLogin.partyId}&communicationEventId=${parameters.communicationEventId}" description="Attach File"/> - </field> - <field name="contentMimeTypeId"><hidden value="text/plain"/></field> - <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="80" rows="20"/></field> - <field name="save" title="&nbsp;"> - <hyperlink also-hidden="true" target-type="plain" description="Save" target="javascript:(document.MyPageNewEmail.statusId.value='COM_PENDING'),(document.MyPageNewEmail.submit())"/> + <hyperlink target="addAttachmentEmail?communicationEventTypeId=${parameters.communicationEventTypeId}&partyId=${userLogin.partyId}&communicationEventId=${parameters.communicationEventId}&parentCommEventId=${parameters.parentCommEventId}&originalCommEventId=${parameters.originalCommEventId}" description="Attach File"/> </field> - <field name="send" title="&nbsp;"> + <field name="contentMimeTypeId"><hidden value="text/plain"/></field> + <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="80" rows="20" default-value="${parameters.content}"/></field> + <field name="send" title="&nbsp;" position="1"> <hyperlink also-hidden="true" target-type="plain" description="Send" target="javascript:(document.MyPageNewEmail.submit())"/> </field> + <field name="save" title="&nbsp;" position="2"> + <hyperlink also-hidden="true" target-type="plain" description="Save" target="javascript:(document.MyPageNewEmail.statusId.value='COM_PENDING'),(document.MyPageNewEmail.submit())"/> + </field> + <field name="dummy" position="320"><hidden/></field> </form> <form name="ListPhaseInfo" extends="ListPhaseInfo" extends-resource="component://projectmgr/widget/forms/ProjectForms.xml"> <field name="phase"><display description="${phaseName}"/></field> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Wed Oct 22 23:13:39 2008 @@ -184,26 +184,88 @@ </menu-item> <menu-item name="myTime" title="myTime"><link target="/projectmgr/control/MyTimesheet" url-mode="inter-app"/></menu-item> </menu> - <menu name="CommSubTabBar" extends="CommSubTabBar" extends-resource="component://party/webapp/partymgr/communication/CommMenus.xml" - menu-container-style="button-bar button-style-2"> + <menu name="CommSubTabBar" menu-container-style="button-bar button-style-2"> + <menu-item name="new" title="${uiLabelMap.PartyNewCommunication}"> + <condition> + <and> + <if-has-permission permission="PARTYMGR_CME_CREATE"/> + <if-has-permission permission="PARTYMGR_CME-EMAIL_CREATE"/> + </and> + </condition> + <link target="EditCommunicationEvent?donePage=${parameters.donePage}"/> + </menu-item> + <menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}"> + <condition> + <if-has-permission permission="PARTYMGR_CME-EMAIL_CREATE"/> + </condition> + <link target="NewCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION&donePage=${parameters.donePage}&partyIdFrom=${userLogin.partyId}&statusId=COM_PENDING"/> + </menu-item> + <menu-item name="newInternalNote" title="${uiLabelMap.PartyNewInternalNote}"> + <condition> + <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/> + </condition> + <link target="EditCommunicationEvent?communicationEventTypeId=COMMENT_NOTE&donePage=${parameters.donePage}"/> + </menu-item> + <menu-item name="reply" title="${uiLabelMap.PartyReply}"> + <condition> + <and> + <not><if-empty field-name="parameters.communicationEventId"/></not> + <not><if-empty field-name="communicationEvent.partyIdFrom"/></not> + <if-compare field-name="communicationEvent.partyIdFrom" operator="not-equals" value="${userLogin.partyId}"/> + <if-has-permission permission="PARTYMGR_CME-EMAIL_UPDATE"/> + <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/> + </and> + </condition> + <link target="NewCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION&partyIdFrom=${userLogin.partyId}&statusId=COM_PENDING&parentCommEventId=${parameters.communicationEventId}"/> + </menu-item> + <menu-item name="forward" title="${uiLabelMap.Forward}"> + <condition> + <and> + <not><if-empty field-name="parameters.communicationEventId"/></not> + <not><if-empty field-name="communicationEvent.partyIdFrom"/></not> + <if-compare field-name="communicationEvent.partyIdFrom" operator="not-equals" value="${userLogin.partyId}"/> + <if-has-permission permission="PARTYMGR_CME-EMAIL_UPDATE"/> + <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/> + </and> + </condition> + <link target="NewCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION&partyIdFrom=${userLogin.partyId}&statusId=COM_PENDING&originalCommEventId=${parameters.communicationEventId}"/> + </menu-item> + <menu-item name="createRequestFromCommEvent" title="${uiLabelMap.PartyCreateRequestFromCommEvent}"> + <condition> + <and> + <not><if-empty field-name="parameters.communicationEventId"/></not> + <not><if-empty field-name="communicationEvent.partyIdFrom"/></not> + <if-has-permission permission="ORDERMGR_CRQ_CREATE"/> + </and> + </condition> + <link target="editRequestFromCommEvent?communicationEventId=${parameters.communicationEventId}"/> + </menu-item> <menu-item name="close" title="${uiLabelMap.CommonClose}"> <condition> <and> <not><if-empty field-name="communicationEventRole"/></not> <if-compare field-name="communicationEventRole.statusId" operator="equals" value="COM_ROLE_READ"/> + <if-has-permission permission="PARTYMGR_CME-EMAIL_CREATE"/> </and> </condition> <link target="setCommunicationEventRoleStatus?communicationEventId=${parameters.communicationEventId}&partyId=${userLogin.partyId}&roleTypeId=${communicationEventRole.roleTypeId}&statusId=COM_ROLE_COMPLETED"/> </menu-item> <menu-item name="send" title="${uiLabelMap.CommonSend}"> <condition> - <if-compare field-name="commEvent.statusId" operator="equals" value="COM_READ"/> + <and> + <not><if-empty field-name="parameters.communicationEventId"/></not> + <if-compare field-name="commEvent.statusId" operator="equals" value="COM_PENDING"/> + <if-has-permission permission="PARTYMGR_CME-EMAIL_UPDATE"/> + </and> </condition> <link target="updateCommunicationEvent/main?communicationEventId=${parameters.communicationEventId}&statusId=COM_IN_PROGRESS"/> </menu-item> <menu-item name="delete" title="${uiLabelMap.CommonDelete}"> <condition> - <not><if-empty field-name="communicationEventRole"/></not> + <and> + <not><if-empty field-name="communicationEventRole"/></not> + <if-has-permission permission="PARTYMGR_CME-EMAIL_DELETE"/> + </and> </condition> <link target="RemoveCommunicationEventRole?communicationEventId=${parameters.communicationEventId}&roleTypeId=${communicationEventRole.roleTypeId}&partyId=${userLogin.partyId}&deleteCommEventIfLast=Y&delContentDataResource=Y"/> </menu-item> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=707285&r1=707284&r2=707285&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Wed Oct 22 23:13:39 2008 @@ -535,6 +535,7 @@ <set field="tabButtonItem" value="CommunicationEvent" /> <entity-one entity-name="CommunicationEvent" value-name="communicationEvent" /> <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy"/> + <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy"/> </actions> <widgets> <decorator-screen name="CommonCommunicationEventDecorator" @@ -552,6 +553,7 @@ <widgets> <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent}" collapsible="true"> <include-form location="component://mypage/widget/MyPageForms.xml" name="MyPageNewEmail"/> + <include-screen name="AttachFiletList"/> </screenlet> </widgets> </section> @@ -606,7 +608,7 @@ </entity-condition> <set field="communicationEventId" from-field="parameters.communicationEventId"/> <set field="communicationEventTypeId" from-field="parameters.communicationEventTypeId"/> - <set field="partyId" from-field="parameters.partyId"/> + <set field="partyId" from-field="userLogin.partyId"/> </actions> <widgets> <decorator-screen name="CommonCommunicationEventDecorator" @@ -631,7 +633,7 @@ <field-map field-name="communicationEventId" env-name="parameters.communicationEventId"/> </entity-and> <entity-and entity-name="PartyContent" list-name="partyContent"> - <field-map field-name="partyId" env-name="parameters.partyId"/> + <field-map field-name="partyId" env-name="userLogin.partyId"/> </entity-and> </actions> <widgets> |
Free forum by Nabble | Edit this page |