You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2009/04/16 08:48:26 UTC
svn commit: r765486 - in /ofbiz/trunk/applications/marketing:
webapp/marketing/contact/ContactCommunicationPreview.ftl
webapp/marketing/contact/ContactListForms.xml
webapp/marketing/contact/ContactListMenus.xml widget/ContactListScreens.xml
Author: jaz
Date: Thu Apr 16 06:48:26 2009
New Revision: 765486
URL: http://svn.apache.org/viewvc?rev=765486&view=rev
Log:
implemented basic preview; opens a new window (not decorated by ofbiz) and displays the HTML output along with the subject and from address for verification
Added:
ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactCommunicationPreview.ftl
Modified:
ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml
ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListMenus.xml
ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml
Added: ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactCommunicationPreview.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactCommunicationPreview.ftl?rev=765486&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactCommunicationPreview.ftl (added)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactCommunicationPreview.ftl Thu Apr 16 06:48:26 2009
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <title>PREVIEW</title>
+ </head>
+ <body>
+ <pre>
+ From: ${(contactMech.infoString)!}
+ Subject: ${(communicationEvent.subject)!}
+ </pre>
+ <hr/>
+ ${StringUtil.wrapString(communicationEvent.content)!}
+
+ </body>
+</html>
\ No newline at end of file
Modified: ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml?rev=765486&r1=765485&r2=765486&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml Thu Apr 16 06:48:26 2009
@@ -506,17 +506,5 @@
<field name="contactMechId"><display-entity entity-name="ContactMech" description="${infoString}"/></field>
<field name="lastUpdatedStamp" title="${uiLabelMap.FormFieldTitle_lastModifiedDate}"><display/></field>
<field name="statusId"><display-entity entity-name="StatusItem" description="${description}"/></field>
- </form>
-
- <form name="PreviewContactListCommEvent" target="" title="" type="single" default-map-name="communicationEvent">
- <field name="subject"><display/></field>
- <field name="content" title=" "><display type="text"/></field>
-
- <sort-order>
- <sort-field name="subject"/>
- <field-group>
- <sort-field name="content"/>
- </field-group>
- </sort-order>
- </form>
+ </form>
</forms>
Modified: ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListMenus.xml?rev=765486&r1=765485&r2=765486&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListMenus.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListMenus.xml Thu Apr 16 06:48:26 2009
@@ -47,7 +47,7 @@
</not>
</and>
</condition>
- <link target="PreviewContactListCommEvent">
+ <link target="PreviewContactListCommEvent" target-window="_blank">
<parameter param-name="communicationEventId"/>
<parameter param-name="contactListId"/>
</link>
Modified: ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml?rev=765486&r1=765485&r2=765486&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml Thu Apr 16 06:48:26 2009
@@ -486,13 +486,18 @@
<entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
<entity-one entity-name="ContactList" value-field="contactList"/>
+ <entity-one entity-name="ContactMech" value-field="contactMech">
+ <field-map field-name="contactMechId" from-field="communicationEvent.contactMechIdFrom"/>
+ </entity-one>
+
+ <set field="content" value="${groovy:org.ofbiz.base.util.StringUtil.wrapString(communicationEvent.content)}"/>
</actions>
<widgets>
- <decorator-screen name="CommonContactListDecorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="body">
- <include-form name="PreviewContactListCommEvent" location="component://marketing/webapp/marketing/contact/ContactListForms.xml"/>
- </decorator-section>
- </decorator-screen>
+ <platform-specific>
+ <html>
+ <html-template location="component://marketing/webapp/marketing/contact/ContactCommunicationPreview.ftl"/>
+ </html>
+ </platform-specific>
</widgets>
</section>
</screen>