svn commit: r659755 - in /ofbiz/trunk/applications: marketing/ marketing/data/ marketing/webapp/sfa/WEB-INF/ marketing/webapp/sfa/error/ marketing/widget/sfa/ party/webapp/partymgr/WEB-INF/actions/party/

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

svn commit: r659755 - in /ofbiz/trunk/applications: marketing/ marketing/data/ marketing/webapp/sfa/WEB-INF/ marketing/webapp/sfa/error/ marketing/widget/sfa/ party/webapp/partymgr/WEB-INF/actions/party/

hansbak-2
Author: hansbak
Date: Fri May 23 23:14:34 2008
New Revision: 659755

URL: http://svn.apache.org/viewvc?rev=659755&view=rev
Log:
add first demo data, add error dir, allow different profiles for account, lead, contact with the same request all in sfa

Added:
    ofbiz/trunk/applications/marketing/data/sfaDemoData.xml
    ofbiz/trunk/applications/marketing/webapp/sfa/error/
    ofbiz/trunk/applications/marketing/webapp/sfa/error/error.jsp   (with props)
    ofbiz/trunk/applications/marketing/webapp/sfa/error/error403.jsp   (with props)
    ofbiz/trunk/applications/marketing/webapp/sfa/error/error404.jsp   (with props)
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/setRoleVars.groovy
Modified:
    ofbiz/trunk/applications/marketing/ofbiz-component.xml
    ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
    ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml

Added: ofbiz/trunk/applications/marketing/data/sfaDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/data/sfaDemoData.xml?rev=659755&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/data/sfaDemoData.xml (added)
+++ ofbiz/trunk/applications/marketing/data/sfaDemoData.xml Fri May 23 23:14:34 2008
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-engine-xml>
+    <!-- demo account -->
+    <Party partyId="sfa100" partyTypeId="PARTY_GROUP" statusId="PARTY_ENABLED"/>
+    <PartyGroup partyId="sfa100" groupName="A profitable Account"/>
+    <PartyRole partyId="sfa100" roleTypeId="_NA_"/>
+    <PartyRole partyId="sfa100" roleTypeId="ACCOUNT"/>
+    <ContactMech contactMechId="sfa100" contactMechTypeId="POSTAL_ADDRESS"/>
+    <ContactMech contactMechId="sfa101" contactMechTypeId="TELECOM_NUMBER"/>
+    <ContactMech contactMechId="sfa102" contactMechTypeId="EMAIL_ADDRESS" infoString="[hidden email]"/>
+    <PostalAddress contactMechId="sfa100" address1="151 Madison street." city="Edison" postalCode="32451" lastUpdatedStamp="2008-05-23 11:57:40.936" lastUpdatedTxStamp="2008-05-23 11:57:39.476" createdStamp="2008-05-23 11:57:40.936" createdTxStamp="2008-05-23 11:57:39.476"/>
+    <TelecomNumber contactMechId="sfa101" countryCode="1" areaCode="33" contactNumber="12456" lastUpdatedStamp="2008-05-23 11:57:41.179" lastUpdatedTxStamp="2008-05-23 11:57:39.476" createdStamp="2008-05-23 11:57:41.179" createdTxStamp="2008-05-23 11:57:39.476"/>
+    <PartyContactMech partyId="sfa100" contactMechId="sfa100" fromDate="2000-01-01 00:00:00.000"/>
+    <PartyContactMech partyId="sfa100" contactMechId="sfa101" fromDate="2000-01-01 00:00:00.000"/>
+    <PartyContactMech partyId="sfa100" contactMechId="sfa102" fromDate="2000-01-01 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa100" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2000-01-01 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa101" contactMechPurposeTypeId="PRIMARY_PHONE" fromDate="2000-01-01 00:00:00.000"/>
+    <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa102" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2000-01-01 00:00:00.000"/>
+
+    <Party partyId="sfa101" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
+    <Person partyId="sfa100"/>
+    <PartyRole partyId="sfa100" roleTypeId="_NA_"/>
+    <PartyRole partyId="sfa100" roleTypeId="CONTACT"/>
+    
+
+</entity-engine-xml>
+
+

Modified: ofbiz/trunk/applications/marketing/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/ofbiz-component.xml?rev=659755&r1=659754&r2=659755&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/ofbiz-component.xml (original)
+++ ofbiz/trunk/applications/marketing/ofbiz-component.xml Fri May 23 23:14:34 2008
@@ -30,6 +30,7 @@
     <entity-resource type="group" reader-name="main" loader="main" location="entitydef/entitygroup.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/MarketingTypeData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/MarketingSecurityData.xml"/>
+    <entity-resource type="data" reader-name="demo" loader="main" location="data/sfaDemoData.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
     <service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
     <webapp name="marketing"

Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=659755&r1=659754&r2=659755&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Fri May 23 23:14:34 2008
@@ -178,6 +178,8 @@
 
     <!-- View Mappings -->
     <view-map name="main" type="screen" page="component://marketing/widget/sfa/CommonScreens.xml#main"/>
+    <view-map name="viewprofile" type="screen" page="component://marketing/widget/sfa/CommonScreens.xml#ViewProfile"/>
+
     <view-map name="FindOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#FindOpportunity"/>
     <view-map name="NewOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#NewOpportunity"/>
     <view-map name="viewOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#viewOpportunity"/>

Added: ofbiz/trunk/applications/marketing/webapp/sfa/error/error.jsp
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/error/error.jsp?rev=659755&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/error/error.jsp (added)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/error/error.jsp Fri May 23 23:14:34 2008
@@ -0,0 +1,53 @@
+<%--
+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.
+--%>
+
+<%@ page import="org.ofbiz.base.util.*" %>
+<html>
+<head>
+<title>Open For Business Message</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
+
+<body bgcolor="#FFFFFF">
+<div align="center">
+  <br/>
+  <table width="100%" border="1" height="200">
+    <tr>
+      <td>
+        <table width="100%" border="0" height="200">
+          <tr bgcolor="#CC6666">
+            <td height="45">
+              <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
+            </td>
+          </tr>
+          <tr>
+            <td>
+              <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
+            </td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  </table>
+</div>
+<div align="center"></div>
+</body>
+</html>

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/error/error.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/error/error.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/marketing/webapp/sfa/error/error403.jsp
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/error/error403.jsp?rev=659755&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/error/error403.jsp (added)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/error/error403.jsp Fri May 23 23:14:34 2008
@@ -0,0 +1,27 @@
+<%--
+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.
+--%>
+
+<html>
+<head>
+<title>ERROR!</title>
+</head>
+<body>
+<h3>An Error 403 Happened: Access to resource Forbidden</h3>
+</body>
+</html>

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/error/error403.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/error/error403.jsp
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/error/error403.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/marketing/webapp/sfa/error/error404.jsp
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/error/error404.jsp?rev=659755&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/error/error404.jsp (added)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/error/error404.jsp Fri May 23 23:14:34 2008
@@ -0,0 +1,27 @@
+<%--
+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.
+--%>
+
+<html>
+<head>
+<title>ERROR!</title>
+</head>
+<body>
+<h3>An Error 404 Happened: Request resource Not Found</h3>
+</body>
+</html>

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/error/error404.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/error/error404.jsp
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/error/error404.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml?rev=659755&r1=659754&r2=659755&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml Fri May 23 23:14:34 2008
@@ -205,4 +205,122 @@
             </widgets>
         </section>
     </screen>
+    <screen name="ViewProfile">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleViewPartyProfile"/>
+                <set field="tabButtonItem" value="viewprofile"/>
+                <set field="headerItem" value="find"/>
+                <set field="labelTitleProperty" value="PartyTaxAuthInfos"/>
+                
+                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/prototype.js" global="true"/>                
+                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/control.progress_bar.js" global="true"/>                
+                <set field="layoutSettings.styleSheets[]" value="/images/prototypejs/progress_bar.css" global="true"/>
+                <set field="layoutSettings.javaScripts[]" value="/partymgr/js/PartyProfileContent.js" global="true"/>                
+                
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/viewprofile.bsh"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/getUserLoginPrimaryEmail.bsh"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/setRoleVars.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <not><if-empty field-name="party"/></not>
+                            </condition>
+                            <widgets>
+                                <section>
+                                    <condition>
+                                        <if-compare field-name="showOld" operator="equals" value="true" type="Boolean"/>
+                                    </condition>
+                                    <widgets>
+                                        <container style="button-bar button-style-2">
+                                            <link target="viewprofile?partyId=${party.partyId}" text="${uiLabelMap.PartyHideOld}"/>
+                                        </container>
+                                    </widgets>
+                                    <fail-widgets>
+                                        <container style="button-bar button-style-2">
+                                            <link target="viewprofile?partyId=${party.partyId}&amp;SHOW_OLD=true" text="${uiLabelMap.PartyShowOld}"/>
+                                        </container>
+                                    </fail-widgets>
+                                </section>
+                                <section>
+                                    <condition>
+                                        <not><if-empty field-name="accountDescription"/></not>                                        
+                                    </condition>
+                                    <widgets>
+                                        <label style="h1" text="Party ${party.partyId} in the Role of ${accountDescription}"/>
+                                        <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="PaymentMethods" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                        </container>
+                                        <container style="profile-right">
+                                            <include-screen name="FinAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="UserLogin" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Attributes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Visits" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Subscriptions" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                        </container>
+                                    </widgets>
+                                </section>
+                                <section>
+                                    <condition>
+                                        <not><if-empty field-name="leadDescription"/></not>                                        
+                                    </condition>
+                                    <widgets>
+                                        <label style="h1" text="Party ${party.partyId} in the Role of ${leadDescription}"/>
+                                        <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="PaymentMethods" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                        </container>
+                                        <container style="profile-right">
+                                            <include-screen name="FinAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="UserLogin" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Attributes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Visits" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Subscriptions" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                        </container>
+                                    </widgets>
+                                </section>
+                                <section>
+                                    <condition>
+                                        <not><if-empty field-name="contactDescription"/></not>                                        
+                                    </condition>
+                                    <widgets>
+                                        <label style="h1" text="Party ${party.partyId} in the Role of ${contactDescription}"/>
+                                        <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="PaymentMethods" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                        </container>
+                                        <container style="profile-right">
+                                            <include-screen name="FinAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="UserLogin" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Attributes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Visits" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Subscriptions" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                        </container>
+                                    </widgets>
+                                </section>
+                            </widgets>
+                            <fail-widgets>
+                                <container>
+                                    <label style="h3">${uiLabelMap.PartyNoPartyFoundWithPartyId}: ${parameters.partyId}</label>
+                                </container>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Added: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/setRoleVars.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/setRoleVars.groovy?rev=659755&view=auto
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/setRoleVars.groovy (added)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/setRoleVars.groovy Fri May 23 23:14:34 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+ import org.ofbiz.entity.*;
+ import org.ofbiz.base.util.*;
+
+ roleTypeAndParty = delegator.findByAnd("RoleTypeAndParty", ['partyId': parameters.partyId, 'roleTypeId': 'ACCOUNT']);
+ if (UtilValidate.isNotEmpty(roleTypeAndParty)) {
+ context.put("accountDescription", roleTypeAndParty.get(0).getString("description"));
+ }
+ roleTypeAndParty = delegator.findByAnd("RoleTypeAndParty", ['partyId': parameters.partyId, 'roleTypeId': 'CONTACT']);
+ if (UtilValidate.isNotEmpty(roleTypeAndParty)) {
+ context.put("contactDescription", roleTypeAndParty.get(0).getString("description"));
+ }
+ roleTypeAndParty = delegator.findByAnd("RoleTypeAndParty", ['partyId': parameters.partyId, 'roleTypeId': 'LEAD']);
+ if (UtilValidate.isNotEmpty(roleTypeAndParty)) {
+ context.put("leadDescription", roleTypeAndParty.get(0).getString("description"));
+ }