svn commit: r783975 - in /ofbiz/trunk/applications/marketing: webapp/sfa/party/findContactParty.ftl webapp/sfa/party/findSfaParty.ftl widget/sfa/AccountScreens.xml widget/sfa/ContactScreens.xml widget/sfa/LeadScreens.xml widget/sfa/forms/LeadForms.xml

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

svn commit: r783975 - in /ofbiz/trunk/applications/marketing: webapp/sfa/party/findContactParty.ftl webapp/sfa/party/findSfaParty.ftl widget/sfa/AccountScreens.xml widget/sfa/ContactScreens.xml widget/sfa/LeadScreens.xml widget/sfa/forms/LeadForms.xml

apatel-2
Author: apatel
Date: Fri Jun 12 04:03:02 2009
New Revision: 783975

URL: http://svn.apache.org/viewvc?rev=783975&view=rev
Log:
Now lead and account search use partyRelationShipId with logged in user. Find Lead will show all leads that logged in user is OWNER.

Added:
    ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl   (with props)
Modified:
    ofbiz/trunk/applications/marketing/webapp/sfa/party/findSfaParty.ftl
    ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml

Added: ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl?rev=783975&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl (added)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl Fri Jun 12 04:03:02 2009
@@ -0,0 +1,140 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<#assign extInfo = parameters.extInfo?default("N")>
+
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+      <li class="h3">${uiLabelMap.SfaFindContacts}</li>
+      <#if parameters.hideFields?default("N") == "Y">
+        <li><a href="<@ofbizUrl>FindContacts?hideFields=N${paramList}</@ofbizUrl>">${uiLabelMap.CommonShowLookupFields}</a></li>
+      <#else>
+        <#if partyList?exists><li><a href="<@ofbizUrl>FindContacts?hideFields=Y${paramList}</@ofbizUrl>">${uiLabelMap.CommonHideFields}</a></li></#if>
+        <li><a href="javascript:document.lookupparty.submit();">${uiLabelMap.PartyLookupParty}</a></li>
+      </#if>
+    </ul>
+    <br/><br/>
+  </div>
+  <#if parameters.hideFields?default("N") != "Y">
+    <div class="screenlet-body">
+      <#-- NOTE: this form is setup to allow a search by partial partyId or userLoginId; to change it to go directly to
+          the viewprofile page when these are entered add the follow attribute to the form element:
+
+           onsubmit="javascript:lookupParty('<@ofbizUrl>viewprofile</@ofbizUrl>');"
+       -->
+      <form method="post" name="lookupparty" action="<@ofbizUrl>FindContacts</@ofbizUrl>" class="basic-form">
+        <input type="hidden" name="lookupFlag" value="Y"/>
+        <input type="hidden" name="hideFields" value="Y"/>
+        <input type="hidden" name="roleTypeId" value="${roleTypeId}"/>
+        <table cellspacing="0">
+          <tr>
+            <td class="label">${uiLabelMap.PartyContactInformation}</td>
+            <td>
+              <input type="radio" name="extInfo" value="N" onclick="javascript:refreshInfo();" <#if extInfo == "N">checked="checked"</#if>/>${uiLabelMap.CommonNone}&nbsp;
+              <input type="radio" name="extInfo" value="P" onclick="javascript:refreshInfo();" <#if extInfo == "P">checked="checked"</#if>/>${uiLabelMap.PartyPostal}&nbsp;
+              <input type="radio" name="extInfo" value="T" onclick="javascript:refreshInfo();" <#if extInfo == "T">checked="checked"</#if>/>${uiLabelMap.PartyTelecom}&nbsp;
+              <input type="radio" name="extInfo" value="O" onclick="javascript:refreshInfo();" <#if extInfo == "O">checked="checked"</#if>/>${uiLabelMap.CommonOther}&nbsp;
+            </td>
+          </tr>
+          <tr>
+            <td class="label">${uiLabelMap.PartyPartyId}</td>
+            <td><input type="text" name="partyId" value="${parameters.partyId?if_exists}"/></td>
+          </tr>
+          <tr>
+            <td class="label">${uiLabelMap.PartyLastName}</td>
+            <td><input type="text" name="lastName" value="${parameters.lastName?if_exists}"/></td>
+          </tr>
+          <tr>
+            <td class="label">${uiLabelMap.PartyFirstName}</td>
+            <td><input type="text" name="firstName" value="${parameters.firstName?if_exists}"/></td>
+          </tr>
+          <#if extInfo == "P">
+            <tr><td colspan="3"><hr/></td></tr>
+            <tr>
+              <td class="label">${uiLabelMap.CommonAddress1}</td>
+              <td><input type="text" name="address1" value="${parameters.address1?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.CommonAddress2}</td>
+              <td><input type="text" name="address2" value="${parameters.address2?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.CommonCity}</td>
+              <td><input type="text" name="city" value="${parameters.city?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.CommonStateProvince}</td>
+              <td>
+                <select name="stateProvinceGeoId">
+                  <#if currentStateGeo?has_content>
+                    <option value="${currentStateGeo.geoId}">${currentStateGeo.geoName?default(currentStateGeo.geoId)}</option>
+                    <option value="${currentStateGeo.geoId}">---</option>
+                  </#if>
+                  <option value="ANY">${uiLabelMap.CommonAnyStateProvince}</option>
+                  ${screens.render("component://common/widget/CommonScreens.xml#states")}
+                </select>
+              </td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyPostalCode}</td>
+              <td><input type="text" name="postalCode" value="${parameters.postalCode?if_exists}"/></td>
+            </tr>
+          </#if>
+          <#if extInfo == "T">
+            <tr><td colspan="3"><hr/></td></tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyCountryCode}</td>
+              <td><input type="text" name="countryCode" value="${parameters.countryCode?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyAreaCode}</td>
+              <td><input type="text" name="areaCode" value="${parameters.areaCode?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyContactNumber}</td>
+              <td><input type="text" name="contactNumber" value="${parameters.contactNumber?if_exists}"/></td>
+            </tr>
+          </#if>
+          <#if extInfo == "O">
+            <tr><td colspan="3"><hr/></td></tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyContactInformation}</td>
+              <td><input type="text" name="infoString" value="${parameters.infoString?if_exists}"/></td>
+            </tr>
+          </#if>
+          <tr><td colspan="3"><hr/></td></tr>
+          <tr>
+            <td>&nbsp;</td>
+            <td>
+              <input type="submit" value="${uiLabelMap.CommonFind}" onClick="javascript:document.lookupparty.submit();"/>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </div>
+  </#if>
+</div>
+
+<#if parameters.hideFields?default("N") != "Y">
+  <script language="JavaScript" type="text/javascript">
+    <!--//
+      document.lookupparty.partyId.focus();
+    //-->
+  </script>
+</#if>

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/party/findContactParty.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/marketing/webapp/sfa/party/findSfaParty.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/party/findSfaParty.ftl?rev=783975&r1=783974&r2=783975&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/party/findSfaParty.ftl (original)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/party/findSfaParty.ftl Fri Jun 12 04:03:02 2009
@@ -17,16 +17,12 @@
 under the License.
 -->
 <#assign extInfo = parameters.extInfo?default("N")>
-<#if roleTypeId=="LEAD">
+<#if partyRelationshipTypeId=="LEAD_OWNER">
   <#assign currentUrl="FindLead"/>
   <#assign title="${uiLabelMap.SfaFindLeads}">
   <#assign currentUrl="FindLeads"/>
   <#assign title="${uiLabelMap.SfaFindLeads}"/>
-<#elseif roleTypeId=="CONTACT">
-  <#assign currentUrl="FindContacts"/>
-  <#assign title="${uiLabelMap.SfaFindContacts}"/>
-</#if>
-<#if roleTypeId == "ACCOUNT">
+<#elseif partyRelationshipTypeId == "ACCOUNT">
   <#assign currentUrl = "FindAccounts"/>
   <#assign title = "${uiLabelMap.MarketingFindAccounts}">
 </#if>
@@ -53,7 +49,7 @@
       <form method="post" name="lookupparty" action="<@ofbizUrl>${currentUrl?if_exists}</@ofbizUrl>" class="basic-form">
         <input type="hidden" name="lookupFlag" value="Y"/>
         <input type="hidden" name="hideFields" value="Y"/>
-        <input type="hidden" name="roleTypeId" value="${roleTypeId}"/>
+        <input type="hidden" name="partyRelationshipTypeId" value="${partyRelationshipTypeId}"/>
         <table cellspacing="0">
           <tr>
             <td class="label">${uiLabelMap.PartyContactInformation}</td>
@@ -68,7 +64,7 @@
             <td class="label">${uiLabelMap.PartyPartyId}</td>
             <td><input type="text" name="partyId" value="${parameters.partyId?if_exists}"/></td>
           </tr>
-          <#if roleTypeId != "ACCOUNT">
+          <#if partyRelationshipTypeId != "ACCOUNT">
             <tr>
               <td class="label">${uiLabelMap.PartyLastName}</td>
               <td><input type="text" name="lastName" value="${parameters.lastName?if_exists}"/></td>
@@ -78,12 +74,10 @@
               <td><input type="text" name="firstName" value="${parameters.firstName?if_exists}"/></td>
             </tr>
           </#if>
-          <#if roleTypeId != "CONTACT">
             <tr>
               <td class="label">${uiLabelMap.PartyPartyGroupName}</td>
               <td><input type="text" name="groupName" value="${parameters.groupName?if_exists}"/></td>
             </tr>
-          </#if>
           <#if extInfo == "P">
             <tr><td colspan="3"><hr/></td></tr>
             <tr>

Modified: ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml?rev=783975&r1=783974&r2=783975&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml Fri Jun 12 04:03:02 2009
@@ -24,7 +24,7 @@
         <section>
             <actions>
                 <set field="titleProperty" value="MarketingFindAccounts"/>
-                <set field="roleTypeId" value="ACCOUNT"/>
+                <set field="partyRelationshipTypeId" value="ACCOUNT"/>
                 <set field="headerItem" value="Accounts"/>
             </actions>
             <widgets>

Modified: ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml?rev=783975&r1=783974&r2=783975&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml Fri Jun 12 04:03:02 2009
@@ -37,7 +37,7 @@
                             <widgets>
                                 <include-menu name="ContactSubTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
                                 <platform-specific>
-                                    <html><html-template location="component://marketing/webapp/sfa/party/findSfaParty.ftl"/></html>
+                                    <html><html-template location="component://marketing/webapp/sfa/party/findContactParty.ftl"/></html>
                                 </platform-specific>
                                 <container style="screenlet">
                                     <container style="screenlet-title-bar">

Modified: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml?rev=783975&r1=783974&r2=783975&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml Fri Jun 12 04:03:02 2009
@@ -23,8 +23,8 @@
      <screen name="FindLeads">
         <section>
             <actions>
-                <set field="roleTypeId" value="LEAD"/>
-                <set field="partyTypeId" value="PERSON"/>
+                <set field="partyRelationshipTypeId" value="LEAD_OWNER"/>
+                <set field="partyTypeId" value="ANY"/>
                 <set field="headerItem" value="Leads"/>
                 <service service-name="findParty" auto-field-map="true"/>
             </actions>

Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml?rev=783975&r1=783974&r2=783975&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml Fri Jun 12 04:03:02 2009
@@ -24,12 +24,9 @@
     <form name="ListLeads" type="list" list-name="partyList" list-entry-name="partyRow" paginate-target="FindLead"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true">
         <row-actions>
-            <entity-one entity-name="Person" value-field="person">
+            <entity-one entity-name="PartyNameView" value-field="partyName">
                 <field-map field-name="partyId" from-field="partyRow.partyId"/>
             </entity-one>
-            <entity-one entity-name="PartyType" value-field="partyType">
-                <field-map field-name="partyTypeId" from-field="partyRow.partyTypeId"/>
-            </entity-one>
             <set field="statusId" from-field="partyRow.statusId"/>
         </row-actions>
         <field name="partyId" title="${uiLabelMap.PartyPartyId}">
@@ -38,7 +35,7 @@
             </hyperlink>
         </field>
         <field name="partyName" title="${uiLabelMap.PartyName}">
-            <hyperlink target="viewprofile" description="${person.lastName}, ${person.firstName}">
+            <hyperlink target="viewprofile" description="${partyName.lastName}${partyName.groupName} ${partyName.firstName} ">
                 <parameter param-name="partyId" from-field="partyRow.partyId"/>
             </hyperlink>
         </field>