You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2011/08/17 09:57:29 UTC
svn commit: r1158558 - in /ofbiz/trunk:
applications/marketing/entitydef/entitymodel.xml
specialpurpose/ecommerce/data/DemoMarketing.xml
specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ContactList.groovy
Author: hansbak
Date: Wed Aug 17 07:57:29 2011
New Revision: 1158558
URL: http://svn.apache.org/viewvc?rev=1158558&view=rev
Log:
create a many to many relationship between contactlist and website, and update demo data...screens to follow
Modified:
ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml
ofbiz/trunk/specialpurpose/ecommerce/data/DemoMarketing.xml
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ContactList.groovy
Modified: ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml?rev=1158558&r1=1158557&r2=1158558&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml Wed Aug 17 07:57:29 2011
@@ -184,6 +184,22 @@ under the License.
<key-map field-name="ownerPartyId" rel-field-name="partyId"/>
</relation>
</entity>
+ <entity entity-name="WebSiteContactList"
+ package-name="org.ofbiz.marketing.contact"
+ title="Web Site Contact List Entity">
+ <field name="webSiteId" type="id-ne"></field>
+ <field name="contactListId" type="id-ne"></field>
+ <field name="fromDate" type="date-time"></field>
+ <field name="thrudate" type="date-time"></field>
+ <prim-key field="webSiteId"/>
+ <prim-key field="contactListId"/>
+ <relation type="one" fk-name="WEB_SITE_CNTCT_LST" rel-entity-name="WebSite">
+ <key-map field-name="webSiteId"/>
+ </relation>
+ <relation type="one" fk-name="CNTCT_LST_WEB_SITE" rel-entity-name="ContactList">
+ <key-map field-name="contactListId"/>
+ </relation>
+ </entity>
<entity entity-name="ContactListCommStatus"
package-name="org.ofbiz.marketing.contact"
title="Contact List Entity">
Modified: ofbiz/trunk/specialpurpose/ecommerce/data/DemoMarketing.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoMarketing.xml?rev=1158558&r1=1158557&r2=1158558&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/data/DemoMarketing.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoMarketing.xml Wed Aug 17 07:57:29 2011
@@ -47,4 +47,7 @@ under the License.
<TrackingCode trackingCodeId="9011" trackingCodeTypeId="EXTERNAL" description ="Affiliate 2" marketingCampaignId="9002" trackableLifetime="2592000" billableLifetime="2592000"/>
<TrackingCode trackingCodeId="9012" trackingCodeTypeId="EXTERNAL" description ="Affiliate 3" marketingCampaignId="9002" trackableLifetime="2592000" billableLifetime="2592000"/>
+ <!-- Demo WebSiteContactList -->
+ <WebSiteContactList webSiteId="WebStore" contactListId="9000" fromDate="2011-08-16 17:15:20.0"/>
+ <WebSiteContactList webSiteId="WebStore" contactListId="9010" fromDate="2011-08-16 17:15:20.0"/>
</entity-engine-xml>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ContactList.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ContactList.groovy?rev=1158558&r1=1158557&r2=1158558&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ContactList.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ContactList.groovy Wed Aug 17 07:57:29 2011
@@ -25,9 +25,19 @@ import org.ofbiz.entity.util.*;
import org.ofbiz.entity.condition.*;
import org.ofbiz.party.contact.ContactMechWorker;
import org.ofbiz.product.store.ProductStoreWorker;
+import org.ofbiz.webapp.website.WebSiteWorker;
import org.ofbiz.accounting.payment.PaymentWorker;
-publicEmailContactLists = delegator.findByAnd("ContactList", [isPublic : "Y", contactMechTypeId : "EMAIL_ADDRESS"], ["contactListName"]);
+/*publicEmailContactLists = delegator.findByAnd("ContactList", [isPublic : "Y", contactMechTypeId : "EMAIL_ADDRESS"], ["contactListName"]);
+context.publicEmailContactLists = publicEmailContactLists;*/
+
+webSiteId = WebSiteWorker.getWebSiteId(request);
+webSiteContactList = delegator.findByAnd("WebSiteContactList", [webSiteId: webSiteId]);
+publicEmailContactLists = [];
+webSiteContactList.each { webSiteContactList ->
+ temp = webSiteContactList.getRelatedOne("ContactList");
+ publicEmailContactLists.add(temp);
+}
context.publicEmailContactLists = publicEmailContactLists;
if (userLogin) {