svn commit: r492877 - in /ofbiz/trunk/applications/party: script/org/ofbiz/party/content/ script/org/ofbiz/party/content/PartyContentServices.xml servicedef/services.xml webapp/partymgr/WEB-INF/controller.xml webapp/partymgr/party/viewprofile.ftl

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

svn commit: r492877 - in /ofbiz/trunk/applications/party: script/org/ofbiz/party/content/ script/org/ofbiz/party/content/PartyContentServices.xml servicedef/services.xml webapp/partymgr/WEB-INF/controller.xml webapp/partymgr/party/viewprofile.ftl

jaz-3
Author: jaz
Date: Thu Jan  4 19:02:22 2007
New Revision: 492877

URL: http://svn.apache.org/viewvc?view=rev&rev=492877
Log:
finished upload party content to profile; links to view image, and content records

Added:
    ofbiz/trunk/applications/party/script/org/ofbiz/party/content/
    ofbiz/trunk/applications/party/script/org/ofbiz/party/content/PartyContentServices.xml   (with props)
Modified:
    ofbiz/trunk/applications/party/servicedef/services.xml
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
    ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl

Added: ofbiz/trunk/applications/party/script/org/ofbiz/party/content/PartyContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/content/PartyContentServices.xml?view=auto&rev=492877
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/content/PartyContentServices.xml (added)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/content/PartyContentServices.xml Thu Jan  4 19:02:22 2007
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Copyright 2001-2007 The Apache Software Foundation
+  ~
+  ~ Licensed 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.
+  -->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd">
+
+    <simple-method method-name="createPartyContent" short-description="Create Party Content Entity">
+        <make-value value-name="partyContent" entity-name="PartyContent"/>
+        <set-pk-fields value-name="partyContent" map-name="parameters"/>
+        <set-nonpk-fields value-name="partyContent" map-name="parameters"/>
+        <create-value value-name="partyContent"/>
+
+        <field-to-result field-name="contentId" map-name="partyContent"/>
+        <field-to-result field-name="partyId" map-name="partyContent"/>
+    </simple-method>
+
+    <simple-method method-name="updatePartyContent" short-description="Update Party Content Entity">
+        <make-value value-name="lookupPkMap" entity-name="PartyContent"/>
+        <set-pk-fields value-name="lookupPkMap" map-name="parameters"/>
+
+        <find-by-primary-key map-name="lookupPkMap" value-name="partyContent"/>
+        <set-nonpk-fields value-name="partyContent" map-name="parameters"/>
+        <store-value value-name="partyContent"/>
+
+        <field-to-result field-name="contentId" map-name="partyContent"/>
+        <field-to-result field-name="partyId" map-name="partyContent"/>
+    </simple-method>
+
+    <simple-method method-name="removePartyContent" short-description="Update Party Content Entity">
+        <make-value value-name="lookupPkMap" entity-name="PartyContent"/>
+        <set-pk-fields value-name="lookupPkMap" map-name="parameters"/>
+
+        <find-by-primary-key map-name="lookupPkMap" value-name="partyContent"/>
+        <remove-value value-name="partyContent"/>        
+    </simple-method>
+
+</simple-methods>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/party/script/org/ofbiz/party/content/PartyContentServices.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/party/script/org/ofbiz/party/content/PartyContentServices.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/party/script/org/ofbiz/party/content/PartyContentServices.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?view=diff&rev=492877&r1=492876&r2=492877
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Thu Jan  4 19:02:22 2007
@@ -715,7 +715,7 @@
     <service name="createPartyTextContent" engine="route" transaction-timeout="300" auth="true">
         <description>Creates a Text Document DataResource and Content Records</description>
         <implements service="createTextContent" optional="false"/>
-        <implements service="createPartyContent" optional="false"/>
+        <implements service="createPartyContent" optional="false"/>        
         <override name="contentId" optional="true"/>
     </service>
 

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?view=diff&rev=492877&r1=492876&r2=492877
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Thu Jan  4 19:02:22 2007
@@ -861,6 +861,13 @@
         <response name="error" type="view" value="viewprofile"/>
     </request-map>
 
+    <request-map uri="img">
+        <security auth="false" https="false"/>
+        <event type="java" path="org.ofbiz.content.data.DataEvents" invoke="serveImage"/>
+        <response name="success" type="none"/>
+        <response name="error" type="view" value="main"/>
+    </request-map>
+
     <!-- Lookup request mappings -->
     <request-map uri="LookupPartyName"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyName"/></request-map>
     <request-map uri="LookupPerson"><security https="true" auth="true"/><response name="success" type="view" value="LookupPerson"/></request-map>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl?view=diff&rev=492877&r1=492876&r2=492877
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl Thu Jan  4 19:02:22 2007
@@ -618,7 +618,7 @@
               <#assign status = content.getRelatedOneCache("StatusItem")>
               <#assign pcPurpose = pContent.getRelatedOne("Enumeration")>
               <tr>
-                <td><a href="<@ofbizUrl>img/${content.contentName}?imgId=${content.dataResourceId}</@ofbizUrl>" class="buttontext">${content.contentId}</a>
+                <td><a href="<@ofbizUrl>EditPartyContents?contentId=${pContent.contentId}&partyId=${pContent.partyId}</@ofbizUrl>" class="buttontext">${content.contentId}</a>
                 <td><div class="tabletext">${pcPurpose.description?if_exists}</div></td>
                 <td><div class="tabletext">${content.contentName?if_exists}</div></td>
                 <td><div class="tabletext">${(contentType.get("description",locale))?if_exists}</div></td>
@@ -646,9 +646,17 @@
             <input type="hidden" name="partyId" value="${partyId}"/>
             <input type="file" name="uploadedFile" size="20" class="inputBox"/>
             <select name="contentPurposeEnumId" class="selectBox">
+                <option value="">Select Purpose</option>
                 <#list contentPurposes as contentPurpose>
                     <option value="${contentPurpose.enumId}">${contentPurpose.description?default(contentPurpose.enumId)}</option>                  
                 </#list>
+            </select>
+            <select name="roleTypeId" class="selectBox">
+                <option value="">Select Role</option>
+                <#list roles as role>
+                    <option value="${role.roleTypeId}">${role.description?default(role.roleTypeId)}</option>
+                </#list>
+            </select>
             <input type="submit" value="${uiLabelMap.CommonUpload}" class="smallSubmit"/>
           </form>
         </div>