svn commit: r688258 - in /ofbiz/trunk/applications/party: config/PartyUiLabels.xml webapp/partymgr/party/PartyForms.xml widget/partymgr/PartyScreens.xml widget/partymgr/ProfileScreens.xml

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

svn commit: r688258 - in /ofbiz/trunk/applications/party: config/PartyUiLabels.xml webapp/partymgr/party/PartyForms.xml widget/partymgr/PartyScreens.xml widget/partymgr/ProfileScreens.xml

hansbak-2
Author: hansbak
Date: Fri Aug 22 21:04:16 2008
New Revision: 688258

URL: http://svn.apache.org/viewvc?rev=688258&view=rev
Log:
list related contacts or accounts on the party profile if available, try the demo partId: DemoCustCompany

Modified:
    ofbiz/trunk/applications/party/config/PartyUiLabels.xml
    ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
    ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
    ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml

Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=688258&r1=688257&r2=688258&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Fri Aug 22 21:04:16 2008
@@ -1230,6 +1230,12 @@
         <value xml:lang="th">ปีกับผู้ว่าจ้าง</value>
         <value xml:lang="zh">年为雇主</value>
     </property>
+    <property key="ListRelatedContacts">
+        <value xml:lang="en">List Related Contacts</value>
+    </property>
+    <property key="ListRelatedAccounts">
+        <value xml:lang="en">List Related Accounts</value>
+    </property>
     <property key="OrderNewOrder">
         <value xml:lang="de">Neuer Auftrag</value>
         <value xml:lang="en">New Order</value>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml?rev=688258&r1=688257&r2=688258&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml Fri Aug 22 21:04:16 2008
@@ -654,4 +654,26 @@
         <field name="thruDate"><display/></field>
     </form>
 
+    <form name="ListRelatedContacts" type="list" list-name="contacts" default-table-style="basic-table">
+        <field name="partyIdTo">
+            <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}" key-field-name="partyId">
+                <sub-hyperlink description="[${partyIdTo}]" target="viewprofile?partyId=${partyIdTo}"/>
+            </display-entity>
+        </field>
+        <field name="partyRelationshipTypeId"><display-entity entity-name="PartyRelationshipType" description="${partyRelationshipName}"/></field>
+        <field name="fromDate"><display type="date"/></field>
+        <field name="thruDate"><display type="date"/></field>
+    </form>
+
+    <form name="ListRelatedAccounts" type="list" list-name="accounts" default-table-style="basic-table">
+        <field name="partyIdFrom">
+            <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}" key-field-name="partyId">
+                <sub-hyperlink description="[${partyIdFrom}]" target="viewprofile?partyId=${partyIdFrom}"/>
+            </display-entity>
+        </field>
+        <field name="partyRelationshipTypeId"><display-entity entity-name="PartyRelationshipType" description="${partyRelationshipName}"/></field>
+        <field name="fromDate"><display type="date"/></field>
+        <field name="thruDate"><display type="date"/></field>
+    </form>
+
 </forms>

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=688258&r1=688257&r2=688258&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Fri Aug 22 21:04:16 2008
@@ -100,6 +100,7 @@
                                         <container style="profile-left">
                                             <include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="contactsAndAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="LoyaltyPoints" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="PaymentMethods" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="AvsSettings" location="component://party/widget/partymgr/ProfileScreens.xml"/>

Modified: ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml?rev=688258&r1=688257&r2=688258&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml Fri Aug 22 21:04:16 2008
@@ -444,16 +444,54 @@
                 <set field="partyId" from-field="parameters.partyId"/>
             </actions>
             <widgets>
-                <container style="screenlet">
+                <screenlet title="${uiLabelMap.PartyShipperAccount}">
                     <platform-specific>
                         <html>
                             <html-template location="component://party/webapp/partymgr/party/profileblocks/ShipperAccount.ftl"/>
                         </html>
                     </platform-specific>
-                    <container style="screenlet-body">
                         <include-form name="ListCarrierAccounts" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
-                    </container>
-                </container>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="contactsAndAccounts">
+        <section>
+            <actions>
+                <set field="partyId" from-field="parameters.partyId"/>
+                <entity-and list-name="contacts" entity-name="PartyRelationshipAndDetail">
+                    <field-map field-name="partyIdFrom" env-name="parameters.partyId"/>
+                    <field-map field-name="roleTypeIdFrom" value="ACCOUNT"/>
+                    <field-map field-name="roleTypeIdTo" value="CONTACT"/>
+                </entity-and>
+                <entity-and list-name="accounts" entity-name="PartyRelationshipAndDetail">
+                    <field-map field-name="partyIdTo" env-name="parameters.partyId"/>
+                    <field-map field-name="roleTypeIdFrom" value="ACCOUNT"/>
+                    <field-map field-name="roleTypeIdTo" value="CONTACT"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <section>
+                    <condition>
+                        <not><if-empty field-name="contacts"/></not>
+                    </condition>
+                    <widgets>
+                        <screenlet title="${uiLabelMap.ListRelatedContacts}" navigation-form-name="ListContacts">
+                            <include-form name="ListRelatedContacts" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+                        </screenlet>
+                    </widgets>
+                </section>
+                <section>
+                    <condition>
+                        <not><if-empty field-name="accounts"/></not>
+                    </condition>
+                    <widgets>
+                        <screenlet title="${uiLabelMap.ListRelatedAccounts}" navigation-form-name="ListAccounts">
+                            <include-form name="ListRelatedAccounts" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+                        </screenlet>
+                    </widgets>
+                </section>
             </widgets>
         </section>
     </screen>