Author: hansbak
Date: Fri Aug 19 05:57:25 2011 New Revision: 1159508 URL: http://svn.apache.org/viewvc?rev=1159508&view=rev Log: update websiteContactlist entity according Jacopo's comments, added services and screens to website and contactlist to maintain the data, a contribution of 'M', an employee of antwebsystems.com Modified: ofbiz/trunk/applications/content/config/ContentUiLabels.xml ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml ofbiz/trunk/applications/content/widget/WebSiteScreens.xml ofbiz/trunk/applications/content/widget/content/ContentMenus.xml ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml ofbiz/trunk/applications/marketing/servicedef/services.xml ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml ofbiz/trunk/applications/marketing/widget/ContactListForms.xml ofbiz/trunk/applications/marketing/widget/ContactListMenus.xml ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ContactList.groovy Modified: ofbiz/trunk/applications/content/config/ContentUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/ContentUiLabels.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/content/config/ContentUiLabels.xml (original) +++ ofbiz/trunk/applications/content/config/ContentUiLabels.xml Fri Aug 19 05:57:25 2011 @@ -2655,6 +2655,15 @@ <value xml:lang="zh">éå å°å 容</value> <value xml:lang="zh_TW">éå å°å §å®¹</value> </property> + <property key="ContentWebSiteContactList"> + <value xml:lang="en">Contact Lists</value> + </property> + <property key="ContentWebSiteContactListCreate"> + <value xml:lang="en">Create Contact List</value> + </property> + <property key="ContentWebSiteContactListView"> + <value xml:lang="en">Contact Lists View</value> + </property> <property key="ContentWebSiteContent"> <value xml:lang="da">Webside indhold</value> <value xml:lang="de">Webseite Inhalt</value> Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Fri Aug 19 05:57:25 2011 @@ -1880,6 +1880,29 @@ under the License. <response name="success" type="view" value="WebSiteSEO"/> <response name="error" type="view" value="WebSiteSEO"/> </request-map> + <!-- WebSiteContactList --> + <request-map uri="WebSiteContactList"> + <security https="true" auth="true"/> + <response name="success" type="view" value="WebSiteContactList"/> + </request-map> + <request-map uri="createWebSiteContactList"> + <security https="true" auth="false"/> + <event type="service" invoke="createWebSiteContactList"/> + <response name="success" type="view" value="WebSiteContactList"/> + <response name="error" type="view" value="WebSiteContactList"/> + </request-map> + <request-map uri="updateWebSiteContactList"> + <security https="true" auth="false"/> + <event type="service" invoke="updateWebSiteContactList"/> + <response name="success" type="view" value="WebSiteContactList"/> + <response name="error" type="view" value="WebSiteContactList"/> + </request-map> + <request-map uri="deleteWebSiteContactList"> + <security https="true" auth="false"/> + <event type="service" invoke="deleteWebSiteContactList"/> + <response name="success" type="view" value="WebSiteContactList"/> + <response name="error" type="view" value="WebSiteContactList"/> + </request-map> <!-- View Mappings --> <view-map name="main" type="screen" page="component://content/widget/CommonScreens.xml#main"/> @@ -1920,6 +1943,7 @@ under the License. <view-map name="WebSiteCMSNav" page="component://content/widget/WebSiteScreens.xml#WebSiteCMSNav" type="screen"/> <view-map name="EditWebSiteParties" page="component://content/widget/WebSiteScreens.xml#EditWebSiteParties" type="screen"/> <view-map name="WebSiteSEO" page="component://content/widget/WebSiteScreens.xml#WebSiteSEO" type="screen"/> + <view-map name="WebSiteContactList" page="component://content/widget/WebSiteScreens.xml#WebSiteContactList" type="screen"/> <view-map name="EditContentPurpose" page="component://content/widget/content/ContentScreens.xml#EditContentPurpose" type="screen"/> <view-map name="EditContentRole" page="component://content/widget/content/ContentScreens.xml#EditContentRole" type="screen"/> Modified: ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml (original) +++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml Fri Aug 19 05:57:25 2011 @@ -242,4 +242,53 @@ under the License. </field> <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field> </form> + <form name="CreateWebSiteContactList" type="single" target="createWebSiteContactList" + default-map-name="webSite" title="" header-row-style="header-row" default-table-style="basic-table"> + <actions> + <set field="fromDate" value="${groovy: import org.ofbiz.base.util.UtilDateTime; return UtilDateTime.nowTimestamp();}" type="Timestamp"/> + </actions> + <field name="webSiteId"><display/></field> + <field name="siteName"><display/></field> + <field name="fromDate"><hidden value="${fromDate}"/></field> + <field name="contactListId"> + <drop-down allow-empty="true"> + <entity-options description="${contactListName} [${contactListId}]" entity-name="ContactList" key-field-name="contactListId"></entity-options> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonCreate}"><submit/></field> + </form> + <form name="ViewWebSiteContactList" type="list" target="updateWebSiteContactList" list-name="webSiteContactLists" title="" + header-row-style="header-row" default-table-style="basic-table"> + <actions> + <entity-one entity-name="ContactList" value-field="contactList"> + <field-map field-name="contactListId" from-field="contactListId"/> + </entity-one> + </actions> + <row-actions> + <entity-one entity-name="ContactList" value-field="contactList"> + <field-map field-name="contactListId" from-field="contactListId"/> + </entity-one> + <set field="contactListName" from-field="contactList.contactListName"/> + <set field="description" from-field="contactList.description"/> + </row-actions> + <field name="contactListId"><hidden/></field> + <field name="webSiteId"><hidden/></field> + <field name="contactListName"> + <display-entity entity-name="ContactList" description="${contactListName}" key-field-name="contactListId"> + <sub-hyperlink target="/marketing/control/EditContactList" target-type="inter-app" link-style="linktext" description="[${contactListId}]"> + <parameter param-name="contactListId"/> + </sub-hyperlink> + </display-entity> + </field> + <field name="fromDate"><display type="date-time"/></field> + <field name="thruDate"><date-time/></field> + <field name="updateButton" title="${uiLabelMap.CommonUpdate}"><submit/></field> + <field name="deleteButton" title="${uiLabelMap.CommonDelete}" widget-style="buttontext"> + <hyperlink target="deleteWebSiteContactList" description="${uiLabelMap.CommonDelete}"> + <parameter param-name="webSiteId"/> + <parameter param-name="contactListId"/> + <parameter param-name="fromDate"/> + </hyperlink> + </field> + </form> </forms> Modified: ofbiz/trunk/applications/content/widget/WebSiteScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/WebSiteScreens.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/content/widget/WebSiteScreens.xml (original) +++ ofbiz/trunk/applications/content/widget/WebSiteScreens.xml Fri Aug 19 05:57:25 2011 @@ -392,4 +392,31 @@ under the License. </widgets> </section> </screen> + <screen name="WebSiteContactList"> + <section> + <actions> + <set field="titleProperty" value="ContentWebSiteContactList"/> + <set field="tabButtonItem" value="WebSiteContactList"/> + <set field="labelTitleProperty" value="ContentWebSiteContactList"/> + <set field="webSiteId" from-field="parameters.webSiteId"/> + <entity-one entity-name="WebSite" value-field="webSite"/> + <entity-and list="webSiteContactLists" entity-name="WebSiteContactList"> + <field-map field-name="webSiteId" from-field="webSiteId"/> + <order-by field-name="-fromDate"/> + </entity-and> + </actions> + <widgets> + <decorator-screen name="CommonWebSiteDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.ContentWebSiteContactListCreate}"> + <include-form location="component://content/webapp/content/website/WebSiteForms.xml" name="CreateWebSiteContactList"/> + </screenlet> + <screenlet title="${uiLabelMap.ContentWebSiteContactListView} of webSiteId[${webSiteId}]"> + <include-form location="component://content/webapp/content/website/WebSiteForms.xml" name="ViewWebSiteContactList"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/content/widget/content/ContentMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentMenus.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/content/widget/content/ContentMenus.xml (original) +++ ofbiz/trunk/applications/content/widget/content/ContentMenus.xml Fri Aug 19 05:57:25 2011 @@ -174,6 +174,11 @@ under the License. <parameter param-name="webSiteId" from-field="parameters.webSiteId"/> </link> </menu-item> + <menu-item name="WebSiteContactList" title="${uiLabelMap.ContentWebSiteContactList}"> + <link target="WebSiteContactList"> + <parameter param-name="webSiteId" from-field="parameters.webSiteId"/> + </link> + </menu-item> </menu> <menu name="blog" menu-container-style="button-bar tab-bar" default-selected-style="selected" default-menu-item-name="content" default-permission-operation="CONTENT_ADMIN" default-permission-entity-action="_ADMIN" default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="tabButtonItem" Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml (original) +++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml Fri Aug 19 05:57:25 2011 @@ -1548,6 +1548,15 @@ <value xml:lang="zh">访é®</value> <value xml:lang="zh_TW">訪å</value> </property> + <property key="MarketingWebSiteContactList"> + <value xml:lang="en">WebSites</value> + </property> + <property key="MarketingWebSiteContactListCreate"> + <value xml:lang="en">Create WebSite</value> + </property> + <property key="MarketingWebSiteContactListView"> + <value xml:lang="en">WebSites View</value> + </property> <property key="PageTitleAccountSummary"> <value xml:lang="en">Account Summary</value> <value xml:lang="fr">Résumé de compte</value> Modified: ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/marketing/entitydef/entitymodel.xml Fri Aug 19 05:57:25 2011 @@ -190,9 +190,10 @@ under the License. <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> + <field name="thruDate" type="date-time"></field> <prim-key field="webSiteId"/> <prim-key field="contactListId"/> + <prim-key field="fromDate"/> <relation type="one" fk-name="WEB_SITE_CNTCT_LST" rel-entity-name="WebSite"> <key-map field-name="webSiteId"/> </relation> Modified: ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml (original) +++ ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml Fri Aug 19 05:57:25 2011 @@ -427,6 +427,41 @@ under the License. </else> </if> </simple-method> + <simple-method method-name="createWebSiteContactList" short-description="Add WebSite ContactList"> + <entity-and list="webSiteContactList" entity-name="WebSiteContactList"> + <field-map field-name="webSiteId" from-field="parameters.webSiteId"/> + <field-map field-name="contactListId" from-field="parameters.contactListId"/> + <field-map field-name="fromDate" from-field="parameters.fromDate"/> + </entity-and> + <if-empty field="webSiteContactList"> + <make-value value-field="webSiteContactList" entity-name="WebSiteContactList"/> + <set-pk-fields value-field="webSiteContactList" map="parameters"/> + <set-nonpk-fields value-field="webSiteContactList" map="parameters"/> + <create-value value-field="webSiteContactList"/> + <return/> + </if-empty> + <set field="message" value="This webSiteContactList (webSiteId[${parameters.webSiteId}], contactListId[${parameters.contactListId}]) already exists."/> + <field-to-result field="message" result-name="errorMessage"></field-to-result> + </simple-method> + <simple-method method-name="updateWebSiteContactList" short-description="Update WebSite ContactList"> + <entity-and list="webSiteContactList" entity-name="WebSiteContactList"> + <field-map field-name="webSiteId" from-field="parameters.webSiteId"/> + <field-map field-name="contactListId" from-field="parameters.contactListId"/> + <field-map field-name="fromDate" from-field="parameters.fromDate"/> + </entity-and> + <first-from-list entry="entryWebSiteContactList" list="webSiteContactList"/> + <set-pk-fields value-field="entryWebSiteContactList" map="parameters"/> + <set-nonpk-fields value-field="entryWebSiteContactList" map="parameters"/> + <store-value value-field="entryWebSiteContactList"/> + </simple-method> + <simple-method method-name="deleteWebSiteContactList" short-description="Delete WebSite ContactList"> + <entity-and list="webSiteContactList" entity-name="WebSiteContactList"> + <field-map field-name="webSiteId" from-field="parameters.webSiteId"/> + <field-map field-name="contactListId" from-field="parameters.contactListId"/> + <field-map field-name="fromDate" from-field="parameters.fromDate"/> + </entity-and> + <remove-list list="webSiteContactList"/> + </simple-method> <!-- service to use in contact list communications to handle opt-out links based on the communication event sent --> <simple-method method-name="optOutOfListFromCommEvent" short-description="Contact List Opt Out From Communication Event" login-required="false"> Modified: ofbiz/trunk/applications/marketing/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/servicedef/services.xml (original) +++ ofbiz/trunk/applications/marketing/servicedef/services.xml Fri Aug 19 05:57:25 2011 @@ -263,6 +263,22 @@ under the License. <attribute name="statusId" type="String" mode="IN"/> </service> + <!-- WebSiteContactList services --> + <service name="createWebSiteContactList" engine="simple" default-entity-name="WebSiteContactList" + location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="createWebSiteContactList"> + <auto-attributes mode="IN" include="pk" optional="false"/> + <auto-attributes mode="IN" include="nonpk" optional="true"/> + </service> + <service name="updateWebSiteContactList" engine="simple" default-entity-name="WebSiteContactList" + location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="updateWebSiteContactList"> + <auto-attributes mode="IN" include="pk" optional="false"/> + <auto-attributes mode="IN" include="nonpk" optional="true"/> + </service> + <service name="deleteWebSiteContactList" engine="simple" default-entity-name="WebSiteContactList" + location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="deleteWebSiteContactList"> + <auto-attributes mode="IN" include="pk" optional="false"/> + </service> + <!-- TrackingCode Services --> <service name="createTrackingCode" default-entity-name="TrackingCode" engine="simple" location="component://marketing/script/org/ofbiz/marketing/tracking/TrackingCodeServices.xml" invoke="createTrackingCode" auth="true"> Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml Fri Aug 19 05:57:25 2011 @@ -331,7 +331,30 @@ under the License. <security https="true" auth="false"/> <event type="service" invoke="updateContactListPartyNoUserLogin"/> <response name="success" type="view" value="ContactListOptOut"/> - </request-map> + </request-map> + <!-- WebSiteContactList request --> + <request-map uri="webSiteContactList"> + <security https="true" auth="true"/> + <response name="success" type="view" value="WebSiteContactList"/> + </request-map> + <request-map uri="createWebSiteContactList"> + <security https="true" auth="false"/> + <event type="service" invoke="createWebSiteContactList"/> + <response name="success" type="view" value="WebSiteContactList"/> + <response name="error" type="view" value="WebSiteContactList"/> + </request-map> + <request-map uri="updateWebSiteContactList"> + <security https="true" auth="false"/> + <event type="service" invoke="updateWebSiteContactList"/> + <response name="success" type="view" value="WebSiteContactList"/> + <response name="error" type="view" value="WebSiteContactList"/> + </request-map> + <request-map uri="deleteWebSiteContactList"> + <security https="true" auth="false"/> + <event type="service" invoke="deleteWebSiteContactList"/> + <response name="success" type="view" value="WebSiteContactList"/> + <response name="error" type="view" value="WebSiteContactList"/> + </request-map> <request-map uri="ListContactListCommEvents"><security https="true" auth="true"/><response name="success" type="view" value="ListContactListCommEvents"/></request-map> <request-map uri="EditContactListCommEvent"><security https="true" auth="true"/><response name="success" type="view" value="EditContactListCommEvent"/></request-map> @@ -443,6 +466,7 @@ under the License. <view-map name="EditContactListParty" type="screen" page="component://marketing/widget/ContactListScreens.xml#EditContactListParty"/> <view-map name="FindContactListParties" type="screen" page="component://marketing/widget/ContactListScreens.xml#FindContactListParties"/> <view-map name="ContactListOptOut" type="screen" page="component://marketing/widget/ContactListScreens.xml#OptOutResponse"/> + <view-map name="WebSiteContactList" type="screen" page="component://marketing/widget/ContactListScreens.xml#WebSiteContactList"/> <view-map name="ListContactListCommEvents" type="screen" page="component://marketing/widget/ContactListScreens.xml#ListContactListCommEvents"/> <view-map name="EditContactListCommEvent" type="screen" page="component://marketing/widget/ContactListScreens.xml#EditContactListCommEvent"/> Modified: ofbiz/trunk/applications/marketing/widget/ContactListForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/ContactListForms.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/ContactListForms.xml (original) +++ ofbiz/trunk/applications/marketing/widget/ContactListForms.xml Fri Aug 19 05:57:25 2011 @@ -614,4 +614,49 @@ under the License. <field name="lastUpdatedStamp" title="${uiLabelMap.FormFieldTitle_lastModifiedDate}"><display/></field> <field name="statusId"><display-entity entity-name="StatusItem" description="${description}"/></field> </form> + <form name="CreateWebSiteContactList" type="single" target="createWebSiteContactList" + default-map-name="contactList" title="" header-row-style="header-row" default-table-style="basic-table"> + <actions> + <set field="fromDate" value="${groovy: import org.ofbiz.base.util.UtilDateTime; return UtilDateTime.nowTimestamp();}" type="Timestamp"/> + </actions> + <field name="contactListId"><display/></field> + <field name="contactListName"><display/></field> + <field name="fromDate"><hidden value="${fromDate}"/></field> + <field name="webSiteId"> + <drop-down allow-empty="true"> + <entity-options description="${siteName} [${webSiteId}]" entity-name="WebSite" key-field-name="webSiteId"></entity-options> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonCreate}"><submit/></field> + </form> + <form name="ViewWebSiteContactList" type="list" target="updateWebSiteContactList" list-name="webSiteContactLists" title="" + header-row-style="header-row" default-table-style="basic-table"> + <actions> + <entity-one entity-name="WebSite" value-field="webSite"/> + </actions> + <row-actions> + <entity-one entity-name="WebSite" value-field="webSite"> + <field-map field-name="webSiteId" from-field="webSiteId"/> + </entity-one> + <set field="siteName" from-field="webSite.siteName"/> + </row-actions> + <field name="contactListId"><hidden/></field> + <field name="webSiteId"><hidden/></field> + <field name="siteName"> + <display-entity entity-name="WebSite" key-field-name="webSiteId"> + <sub-hyperlink target="/content/control/EditWebSite" target-type="inter-app" description="[${webSiteId}]" link-style="linktext"> + <parameter param-name="webSiteId"/> + </sub-hyperlink> + </display-entity></field> + <field name="fromDate"><display type="date-time"/></field> + <field name="thruDate"><date-time/></field> + <field name="updateButton" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext"><submit/></field> + <field name="deleteButton" title="${uiLabelMap.CommonDelete}" widget-style="buttontext"> + <hyperlink target="deleteWebSiteContactList" description="${uiLabelMap.CommonDelete}"> + <parameter param-name="webSiteId"/> + <parameter param-name="contactListId"/> + <parameter param-name="fromDate"/> + </hyperlink> + </field> + </form> </forms> Modified: ofbiz/trunk/applications/marketing/widget/ContactListMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/ContactListMenus.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/ContactListMenus.xml (original) +++ ofbiz/trunk/applications/marketing/widget/ContactListMenus.xml Fri Aug 19 05:57:25 2011 @@ -42,6 +42,11 @@ under the License. <parameter param-name="contactListId"/> </link> </menu-item> + <menu-item name="WebSiteContactList" title="${uiLabelMap.MarketingWebSiteContactList}"> + <link target="webSiteContactList"> + <parameter param-name="contactListId"/> + </link> + </menu-item> </menu> <menu name="ContactListCommBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> Modified: ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml?rev=1159508&r1=1159507&r2=1159508&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml Fri Aug 19 05:57:25 2011 @@ -474,4 +474,29 @@ under the License. </widgets> </section> </screen> + <screen name="WebSiteContactList"> + <section> + <actions> + <set field="titleProperty" value="MarketingWebSiteContactList"/> + <set field="contactListTabButtonItem" value="WebSiteContactList"/> + <entity-one value-field="contactList" entity-name="ContactList"/> + <entity-and list="webSiteContactLists" entity-name="WebSiteContactList"> + <field-map field-name="contactListId" from-field="contactList.contactListId"/> + <order-by field-name="-fromDate"/> + </entity-and> + </actions> + <widgets> + <decorator-screen name="CommonContactListDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.MarketingWebSiteContactListCreate}"> + <include-form location="component://marketing/widget/ContactListForms.xml" name="CreateWebSiteContactList"/> + </screenlet> + <screenlet title="${uiLabelMap.MarketingWebSiteContactListView} of contactListId[${parameters.contactListId}]"> + <include-form location="component://marketing/widget/ContactListForms.xml" name="ViewWebSiteContactList"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> 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=1159508&r1=1159507&r2=1159508&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 Fri Aug 19 05:57:25 2011 @@ -32,7 +32,16 @@ import org.ofbiz.accounting.payment.Paym context.publicEmailContactLists = publicEmailContactLists;*/ webSiteId = WebSiteWorker.getWebSiteId(request); -webSiteContactList = delegator.findByAnd("WebSiteContactList", [webSiteId: webSiteId]); +exprList = []; +exprListThruDate = []; +exprList.add(EntityCondition.makeCondition("webSiteId", EntityOperator.EQUALS, webSiteId)); +exprListThruDate.add(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null)); +exprListThruDate.add(EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN_EQUAL_TO, UtilDateTime.nowTimestamp())); +orCond = EntityCondition.makeCondition(exprListThruDate, EntityOperator.OR); +exprList.add(orCond); +topCond = EntityCondition.makeCondition(exprList, EntityOperator.AND); +webSiteContactList = delegator.findList("WebSiteContactList", topCond, null, null, null, false); + publicEmailContactLists = []; webSiteContactList.each { webSiteContactList -> temp = webSiteContactList.getRelatedOne("ContactList"); |
Free forum by Nabble | Edit this page |