Author: hansbak
Date: Tue Jul 29 18:53:46 2008
New Revision: 680905
URL: http://svn.apache.org/viewvc?rev=680905&view=rev
Log:
add 2 buttons in the commuication event screen
Added:
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy
(with props)
Modified:
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml
ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml
ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml
ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml
Added:
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy?rev=680905&view=auto
==============================================================================
---
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy
(added)
+++
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy
Tue Jul 29 18:53:46 2008
@@ -0,0 +1,38 @@
+/*
+ * 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 org.ofbiz.base.util.*;
+import org.ofbiz.entity.util.EntityUtil;
+
+if (parameters.communicationEventId) {
+ communicationEventRoles = delegator.findByAnd("CommunicationEventRole",
+ ["communicationEventId" : parameters.communicationEventId,
+ "partyId" : userLogin.partyId,
+ "statusId" : "COM_ROLE_READ"
+ ]);
+ if (!communicationEventRoles) {
+ communicationEventRoles =
delegator.findByAnd("CommunicationEventRole",
+ ["communicationEventId" : parameters.communicationEventId,
+ "partyId" : userLogin.partyId
+ ]);
+ }
+ if (communicationEventRoles) {
+ context.communicationEventRole = communicationEventRoles.get(0);
+ }
+}
\ No newline at end of file
Propchange:
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange:
ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy
------------------------------------------------------------------------------
svn:mime-type = text/plain
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=680905&r1=680904&r2=680905&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml
(original)
+++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Tue
Jul 29 18:53:46 2008
@@ -109,7 +109,7 @@
<security https="true" auth="true"/>
<event type="service" invoke="removeCommunicationEventRole"/>
<response name="success" type="request" value="getToNextDonePage"/>
- <response name="error" type="view" value="main"/>
+ <response name="error" type="request" value="getToNextDonePage"/>
</request-map>
<request-map uri="allocateMsgToParty">
<security https="true" auth="true"/>
Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=680905&r1=680904&r2=680905&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Tue Jul 29
18:53:46 2008
@@ -114,12 +114,12 @@
<section>
<actions>
<set field="headerItem" value="${parameters.donePage}"/>
+ <script
location="component://mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <!--include-menu
location="component://mypage/widget/MyPageMenus.xml" name="CommEventTabBar"/-->
- <include-menu
location="component://party/webapp/partymgr/communication/CommMenus.xml"
name="CommSubTabBar"/>
+ <include-menu
location="component://mypage/widget/MyPageMenus.xml" name="CommSubTabBar"/>
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml?rev=680905&r1=680904&r2=680905&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Tue Jul 29
18:53:46 2008
@@ -156,7 +156,23 @@
</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-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"/>
+ </and>
+ </condition>
+ <link
target="setCommunicationEventRoleStatus?communicationEventId=${parameters.communicationEventId}&partyId=${userLogin.partyId}&roleTypeId=${communicationEventRole.roleTypeId}&statusId=COM_ROLE_COMPLETED"/>
+ </menu-item>
+ <menu-item name="delete" title="${uiLabelMap.CommonDelete}">
+ <condition>
+ <not><if-empty field-name="communicationEventRole"/></not>
+ </condition>
+ <link
target="RemoveCommunicationEventRole?communicationEventId=${parameters.communicationEventId}&roleTypeId=${communicationEventRole.roleTypeId}&partyId=${userLogin.partyId}"/>
+ </menu-item>
+ </menu>
</menus>
\ No newline at end of file
Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=680905&r1=680904&r2=680905&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Tue Jul 29
18:53:46 2008
@@ -313,7 +313,8 @@
</entity-one>
</actions>
<widgets>
- <include-screen name="commEvent" />
+ <include-screen name="commEvent"
+
location="component://party/widget/partymgr/CommunicationScreens.xml" />
</widgets>
</section>
</container>