Author: hansbak
Date: Sat Aug 23 09:08:56 2008 New Revision: 688354 URL: http://svn.apache.org/viewvc?rev=688354&view=rev Log: add the possibility to add a contact or a account in the partyrelationship tab, added lookups for contacts and accounts Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=688354&r1=688353&r2=688354&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Sat Aug 23 09:08:56 2008 @@ -637,6 +637,12 @@ <response name="success" type="view" value="EditPartyRelationships"/> <response name="error" type="view" value="EditPartyRelationships"/> </request-map> + <request-map uri="createAccountContact"> + <security https="true" auth="true"/> + <event type="service" path="" invoke="createPartyRelationship"/> + <response name="success" type="view" value="viewprofile"/> + <response name="error" type="view" value="EditPartyRelationships"/> + </request-map> <request-map uri="updatePartyRelationship"> <security https="true" auth="true"/> <event type="service" path="" invoke="updatePartyRelationship"/> @@ -1062,9 +1068,11 @@ <request-map uri="LookupPartyName"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyName"/></request-map> <request-map uri="LookupPartyEmail"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyEmail"/></request-map> <request-map uri="LookupPerson"><security https="true" auth="true"/><response name="success" type="view" value="LookupPerson"/></request-map> + <request-map uri="LookupContact"><security https="true" auth="true"/><response name="success" type="view" value="LookupContact"/></request-map> <request-map uri="LookupPartyAndUserLoginAndPerson"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyAndUserLoginAndPerson"/></request-map> <request-map uri="LookupUserLoginAndPartyDetails"><security https="true" auth="true"/><response name="success" type="view" value="LookupUserLoginAndPartyDetails"/></request-map> <request-map uri="LookupPartyGroup"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyGroup"/></request-map> + <request-map uri="LookupAccount"><security https="true" auth="true"/><response name="success" type="view" value="LookupAccount"/></request-map> <request-map uri="LookupPartyClassificationGroup"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyClassificationGroup"/></request-map> <request-map uri="LookupCommEvent"><security https="true" auth="true"/><response name="success" type="view" value="LookupCommEvent"/></request-map> <request-map uri="LookupCustRequest"><security https="true" auth="true"/><response name="success" type="view" value="LookupCustRequest"/></request-map> @@ -1153,9 +1161,11 @@ <view-map name="LookupPartyEmail" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyEmail"/> <view-map name="LookupPartyClassificationGroup" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyClassificationGroup"/> <view-map name="LookupPerson" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPerson"/> + <view-map name="LookupContact" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupContact"/> <view-map name="LookupPartyAndUserLoginAndPerson" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyAndUserLoginAndPerson"/> <view-map name="LookupUserLoginAndPartyDetails" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupUserLoginAndPartyDetails"/> <view-map name="LookupPartyGroup" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyGroup"/> + <view-map name="LookupAccount" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupAccount"/> <view-map name="LookupCommEvent" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupCommEvent"/> <view-map name="LookupWorkEffort" type="screen" page="component://workeffort/widget/LookupScreens.xml#LookupWorkEffort"/> <view-map name="LookupCustRequest" type="screen" page="component://order/widget/ordermgr/LookupScreens.xml#LookupCustRequest"/> Modified: ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml?rev=688354&r1=688353&r2=688354&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml Sat Aug 23 09:08:56 2008 @@ -184,7 +184,7 @@ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <actions> <service service-name="performFind" result-map-name="result" result-map-list-name="listIt"> - <field-map field-name="inputFields" env-name="requestParameters"/> + <field-map field-name="inputFields" env-name="parameters"/> <field-map field-name="entityName" env-name="entityName"/> </service> </actions> @@ -276,7 +276,7 @@ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <actions> <service service-name="performFind" result-map-name="result" result-map-list-name="listIt"> - <field-map field-name="inputFields" env-name="requestParameters"/> + <field-map field-name="inputFields" env-name="parameters"/> <field-map field-name="entityName" env-name="entityName"/> </service> </actions> 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=688354&r1=688353&r2=688354&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml Sat Aug 23 09:08:56 2008 @@ -676,4 +676,24 @@ <field name="thruDate"><display type="date"/></field> </form> + <form name="AddAccount" type="single" target="createAccountContact"> + <field name="partyId"><hidden value="${parameters.partyId}"/></field> + <field name="partyIdFrom"><lookup target-form-name="LookupAccount"/></field> + <field name="roleTypeIdFrom"><hidden value="ACCOUNT"/></field> + <field name="partyIdTo"><hidden value="${parameters.partyId}"/></field> + <field name="roleTypeIdTo"><hidden value="CONTACT"/></field> + <field name="partyRelationshipTypeId"><hidden value="EMPLOYMENT"/></field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> + </form> + + <form name="AddContact" type="single" target="createAccountContact"> + <field name="partyId"><hidden value="${parameters.partyId}"/></field> + <field name="partyIdFrom"><hidden value="${parameters.partyId}"/></field> + <field name="roleTypeIdFrom"><hidden value="ACCOUNT"/></field> + <field name="partyIdTo"><lookup target-form-name="LookupContact"/></field> + <field name="roleTypeIdTo"><hidden value="CONTACT"/></field> + <field name="partyRelationshipTypeId"><hidden value="EMPLOYMENT"/></field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> + </form> + </forms> Modified: ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml?rev=688354&r1=688353&r2=688354&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml Sat Aug 23 09:08:56 2008 @@ -125,12 +125,9 @@ </condition> <actions> <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> - <set field="title" value="${uiLabelMap.PartyLookupPartyPerson}"/> <set field="entityName" value="Person"/> <set field="queryString" from-field="result.queryString"/> - <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/> - <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/> </actions> <widgets> <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> @@ -144,6 +141,31 @@ </widgets> </section> </screen> + + <screen name="LookupContact"> + <section> + <condition> + <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/> + </condition> + <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> + <set field="title" value="${uiLabelMap.PartyLookupContact}"/> + <set field="entityName" value="PartyRoleAndPartyDetail"/> + <set field="parameters.roleTypeId" value="CONTACT"/> + </actions> + <widgets> + <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="search-options"> + <include-form name="lookupPerson" location="component://party/webapp/partymgr/lookup/LookupForms.xml"/> + </decorator-section> + <decorator-section name="search-results"> + <include-form name="listLookupPerson" location="component://party/webapp/partymgr/lookup/LookupForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="LookupPartyAndUserLoginAndPerson"> <section> <condition> @@ -203,12 +225,31 @@ </condition> <actions> <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> - <set field="title" value="${uiLabelMap.PartyLookupPartyGroup}"/> <set field="entityName" value="PartyGroup"/> - <set field="queryString" from-field="result.queryString"/> - <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/> - <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/> + </actions> + <widgets> + <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="search-options"> + <include-form name="lookupPartyGroup" location="component://party/webapp/partymgr/lookup/LookupForms.xml"/> + </decorator-section> + <decorator-section name="search-results"> + <include-form name="listLookupPartyGroup" location="component://party/webapp/partymgr/lookup/LookupForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="LookupAccount"> + <section> + <condition> + <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/> + </condition> + <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> + <set field="title" value="${uiLabelMap.PartyLookupAccount}"/> + <set field="entityName" value="PartyRoleAndPartyDetail"/> + <set field="parameters.roleTypeId" value="ACCOUNT"/> </actions> <widgets> <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=688354&r1=688353&r2=688354&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Sat Aug 23 09:08:56 2008 @@ -186,7 +186,6 @@ <set field="headerItem" value="find"/> <set field="partyId" from-field="parameters.partyId"/> <entity-one entity-name="Party" value-name="party"/> - <entity-condition entity-name="RoleType" list-name="roleTypes"> <order-by field-name="description"/> <order-by field-name="roleTypeId"/> @@ -213,6 +212,21 @@ <widgets> <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> + <section> + <condition> + <if-compare field-name="party.partyTypeId" operator="equals" value="PERSON"/> + </condition> + <widgets> + <screenlet title="${uiLabelMap.AddRelatedAccount}"> + <include-form name="AddAccount" location="component://party/webapp/partymgr/party/PartyForms.xml"/> + </screenlet> + </widgets> + <fail-widgets> + <screenlet title="${uiLabelMap.AddRelatedContact}"> + <include-form name="AddContact" location="component://party/webapp/partymgr/party/PartyForms.xml"/> + </screenlet> + </fail-widgets> + </section> <platform-specific> <html><html-template location="component://party/webapp/partymgr/party/EditPartyRelationships.ftl"/></html> </platform-specific> @@ -221,20 +235,9 @@ <if-has-permission permission="PARTYMGR" action="_CREATE"/> </condition> <widgets> - <container style="screenlet"> - <container style="screenlet-title-bar"> - <container style="h3"> - <label text="${uiLabelMap.PartyNewRelationshipType}"/> - </container> - </container> - <container style="screenlet-body"> - <section> - <widgets> - <include-form name="AddPartyRelationshipType" location="component://party/webapp/partymgr/party/PartyForms.xml"/> - </widgets> - </section> - </container> - </container> + <screenlet title="${uiLabelMap.PartyNewRelationshipType}"> + <include-form name="AddPartyRelationshipType" location="component://party/webapp/partymgr/party/PartyForms.xml"/> + </screenlet> </widgets> </section> </decorator-section> |
Free forum by Nabble | Edit this page |