svn commit: r797045 - in /ofbiz/trunk/applications/product: config/ webapp/catalog/WEB-INF/ webapp/catalog/find/ webapp/catalog/product/ widget/catalog/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r797045 - in /ofbiz/trunk/applications/product: config/ webapp/catalog/WEB-INF/ webapp/catalog/find/ webapp/catalog/product/ widget/catalog/

mor-2
Author: mor
Date: Thu Jul 23 12:38:13 2009
New Revision: 797045

URL: http://svn.apache.org/viewvc?rev=797045&view=rev
Log:
Added Communications tab on Product page. This will show a list of communication associated to a product. Patch from Akash Jain.

Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
    ofbiz/trunk/applications/product/widget/catalog/Menus.xml
    ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=797045&r1=797044&r2=797045&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Thu Jul 23 12:38:13 2009
@@ -6400,6 +6400,9 @@
         <value xml:lang="it">Aggiungi Categoria Padre</value>
         <value xml:lang="th">เพิ่มหมวดหมู่</value>
     </property>
+    <property key="ProductAddCommunicationEvent">
+        <value xml:lang="en">Add Communication Event</value>
+    </property>
     <property key="ProductAddContentCategory">
         <value xml:lang="de">Inhalt zu Kategorie hinzufügen</value>
         <value xml:lang="en">Add Content to Category</value>

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=797045&r1=797044&r2=797045&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Thu Jul 23 12:38:13 2009
@@ -2471,6 +2471,21 @@
         <response name="error" type="view" value="EditProduct"/>
     </request-map>
 
+    <request-map uri="EditProductCommunicationEvents">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditProductCommunicationEvents"/>
+    </request-map>
+    <request-map uri="AddCommEventForProduct">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditCommunicationEvent"/>
+    </request-map>
+    <request-map uri="createCommunicationEvent">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createCommunicationEvent"/>
+        <response name="success" type="view" value="EditProductCommunicationEvents"/>
+        <response name="error" type="view" value="EditProductCommunicationEvents"/>
+    </request-map>
+
    <!-- ================ Lookup Requests ================= -->
     <request-map uri="LookupContent"><security auth="true" https="true"/><response name="success" type="view" value="LookupContent"/></request-map>
     <request-map uri="LookupFixedAsset"><security auth="true" https="true"/><response name="success" type="view" value="LookupFixedAsset"/></request-map>
@@ -2490,6 +2505,8 @@
     <request-map uri="LookupWorkEffort"><security https="true" auth="true"/><response name="success" type="view" value="LookupWorkEffort"/></request-map>
     <request-map uri="LookupDataResource"><security auth="true" https="true"/><response name="success" type="view" value="LookupDataResource"/></request-map>
     <request-map uri="LookupPerson"><security auth="true" https="true"/><response name="success" type="view" value="LookupPerson"/></request-map>
+    <request-map uri="LookupPreferredContactMech"><security https="true" auth="true"/><response name="success" type="view" value="LookupPreferredContactMech"/></request-map>
+    <request-map uri="LookupContactList"><security https="true" auth="true"/><response name="success" type="view" value="LookupContactList"/></request-map>
 
     <!-- ================ Vendor Product Requests ================= -->
     <request-map uri="EditVendorProduct">
@@ -2637,6 +2654,8 @@
     <view-map name="pendingReviews" type="screen" page="component://product/widget/catalog/ReviewScreens.xml#pendingReviews"/>
 
     <view-map name="ViewProductOrder" type="screen" page="component://product/widget/catalog/ProductScreens.xml#ViewProductOrder"/>
+    <view-map name="EditProductCommunicationEvents" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductCommunicationEvents"/>
+    <view-map name="EditCommunicationEvent" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditCommunicationEvent"/>
 
     <!-- Product Configuration views -->
     <view-map name="ProductConfigItemArticle" type="screen" page="component://product/widget/catalog/ConfigScreens.xml#ProductConfigItemArticle"/>
@@ -2671,5 +2690,7 @@
     <view-map name="LookupWorkEffort" type="screen" page="component://workeffort/widget/LookupScreens.xml#LookupWorkEffort"/>
     <view-map name="LookupDataResource" page="component://content/widget/content/DataResourceScreens.xml#LookupDataResource" type="screen"/>
     <view-map name="LookupPerson" page="component://party/widget/partymgr/LookupScreens.xml#LookupPerson" type="screen"/>
+    <view-map name="LookupPreferredContactMech" type="screen" page="component://marketing/widget/ContactListScreens.xml#LookupPreferredContactMech"/>
+    <view-map name="LookupContactList" type="screen" page="component://party/widget/partymgr/PartyContactListScreens.xml#ListLookupContactList"/>
     <!-- end of view mappings -->
 </site-conf>

Modified: ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl?rev=797045&r1=797044&r2=797045&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl Thu Jul 23 12:38:13 2009
@@ -93,5 +93,6 @@
         <option value="<@ofbizUrl>QuickAddVariants</@ofbizUrl>">${uiLabelMap.ProductVariants}</option>
         <option value="<@ofbizUrl>EditProductConfigs</@ofbizUrl>">${uiLabelMap.ProductConfigs}</option>
         <option value="<@ofbizUrl>viewProductOrder</@ofbizUrl>">${uiLabelMap.OrderOrders}</option>
+        <option value="<@ofbizUrl>EditProductCommunicationEvents</@ofbizUrl>">${uiLabelMap.PartyCommunications}</option>
     </select>
 </form>

Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml?rev=797045&r1=797044&r2=797045&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml Thu Jul 23 12:38:13 2009
@@ -1900,4 +1900,26 @@
         <field name="amount"><display/></field>
         <field name="qtyOrdered"><display/></field>
     </form>
- </forms>
+
+    <form name="ListCommEvents" list-name="communicationEvents" type="list" header-row-style="header-row" default-table-style="basic-table">
+        <field name="communicationEventId" widget-style="buttontext">
+            <hyperlink description="${communicationEventId}" target="/partymgr/control/EditCommunicationEvent?communicationEventId=${communicationEventId}" target-type="inter-app"/>
+        </field>
+        <field name="subject"><display/></field>
+        <field name="communicationEventTypeId"><display-entity description="${description}" entity-name="CommunicationEventType" key-field-name="communicationEventTypeId"/></field>
+        <field name="contactMechTypeId"><display-entity description="${description}" entity-name="ContactMechType" key-field-name="contactMechTypeId"/></field>
+        <field name="statusId" title="${uiLabelMap.ProductStatus}">
+            <display-entity description="${description}" entity-name="StatusItem" key-field-name="statusId"/>
+        </field>
+        <field name="lastUpdatedStampCE" title="Email Sent On"><display/></field>
+        <field name="contactMechIdTo" title="To Email Address">
+            <display-entity  entity-name="ContactMech" key-field-name="contactMechId" description="${infoString}"/>
+        </field>
+        <field name="content"><display/></field>
+        <field map-name="subjectMap" name="subject"><display/></field>
+    </form>
+
+    <form name="EditCommEvent" extends="EditCommEvent" extends-resource="component://party/widget/partymgr/CommunicationEventForms.xml">
+        <field name="productId" map-name="parameters"><hidden/></field>
+    </form>
+ </forms>
\ No newline at end of file

Modified: ofbiz/trunk/applications/product/widget/catalog/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/Menus.xml?rev=797045&r1=797044&r2=797045&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/Menus.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/Menus.xml Thu Jul 23 12:38:13 2009
@@ -400,6 +400,11 @@
                 <parameter param-name="showAll" value="Y"/>
             </link>
         </menu-item>
+        <menu-item name="EditProductCommunicationEvents" title="${uiLabelMap.PartyCommunications}">
+            <link target="EditProductCommunicationEvents">
+                <parameter param-name="productId"/>
+            </link>
+        </menu-item>
     </menu>
 
     <menu name="ConfigItemTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?rev=797045&r1=797044&r2=797045&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Thu Jul 23 12:38:13 2009
@@ -1861,4 +1861,62 @@
             </widgets>
         </section>
     </screen>
+    <screen name="EditProductCommunicationEvents">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleCommEvents"/>
+                <set field="tabButtonItem" value="EditProductCommunicationEvents"/>
+                <set field="labelTitleProperty" value="PageTitleCommEvents"/>
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-one entity-name="Product" value-field="product"/>
+                <entity-and entity-name="CommunicationEventAndProduct" list="communicationEvents">
+                    <field-map field-name="productId"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonProductDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <link style="buttontext" target="AddCommEventForProduct" text="${uiLabelMap.CommonNew}">
+                            <parameter param-name="productId"/>
+                        </link>
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <label text="${uiLabelMap.PageTitleCommEvents}" style="h3"/>
+                            </container>
+                            <container style="screenlet-body">
+                                <include-form name="ListCommEvents" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                            </container>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EditCommunicationEvent">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleCommEvents"/>
+                <set field="tabButtonItem" value="EditProductCommunicationEvents"/>
+                <set field="labelTitleProperty" value="ProductAddCommunicationEvent"/>
+                <set field="productId" from-field="parameters.productId"/>
+                <set field="communicationEventId" from-field="parameters.communicationEventId"/>
+                <entity-one entity-name="Product" value-field="product"/>
+                <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonProductDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <label text="${uiLabelMap.ProductAddCommunicationEvent}" style="h3"/>
+                            </container>
+                            <container style="screenlet-body">
+                                <include-form name="EditCommEvent" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                            </container>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>