You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/05/15 12:48:52 UTC
svn commit: r538129 - in
/ofbiz/trunk/applications/ecommerce/webapp/ecommerce:
WEB-INF/actions/customer/viewprofile.bsh WEB-INF/controller.xml
customer/viewprofile.ftl
Author: jacopoc
Date: Tue May 15 03:48:51 2007
New Revision: 538129
URL: http://svn.apache.org/viewvc?view=rev&rev=538129
Log:
Misc fixes for the party content upload form of the ecommerce party profile.
Modified:
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh?view=diff&rev=538129&r1=538128&r2=538129
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh Tue May 15 03:48:51 2007
@@ -69,6 +69,12 @@
partyContent = EntityUtil.filterByDate(partyContent);
context.put("partyContent", partyContent);
+ mimeTypes = delegator.findAll("MimeType", UtilMisc.toList("description", "mimeTypeId"));
+ context.put("mimeTypes", mimeTypes);
+
+ contentPurposes = delegator.findByAnd("Enumeration", UtilMisc.toMap("enumTypeId", "PTYCNT_PRP"), UtilMisc.toList("sequenceId"));
+ context.put("contentPurposes", contentPurposes);
+
// call the getOrderedSummaryInformation service to get the sub-total of valid orders in last X months
monthsToInclude = new Integer(12);
Map serviceIn = UtilMisc.toMap("partyId", partyId, "roleTypeId", "PLACING_CUSTOMER", "orderTypeId", "SALES_ORDER", "statusId", "ORDER_COMPLETED", "monthsToInclude", monthsToInclude, "userLogin", userLogin);
@@ -79,12 +85,12 @@
contactListPartyList = delegator.findByAnd("ContactListParty", UtilMisc.toMap("partyId", partyId), UtilMisc.toList("-fromDate"));
// show all, including history, ie don't filter: contactListPartyList = EntityUtil.filterByDate(contactListPartyList, true);
- context.put("contactListPartyList", contactListPartyList);
-
- publicContactLists = delegator.findByAnd("ContactList", UtilMisc.toMap("isPublic", "Y"), UtilMisc.toList("contactListName"));
- context.put("publicContactLists", publicContactLists);
-
- partyAndContactMechList = delegator.findByAnd("PartyAndContactMech", UtilMisc.toMap("partyId", partyId), UtilMisc.toList("-fromDate"));
- partyAndContactMechList = EntityUtil.filterByDate(partyAndContactMechList, true);
- context.put("partyAndContactMechList", partyAndContactMechList);
+ context.put("contactListPartyList", contactListPartyList);
+
+ publicContactLists = delegator.findByAnd("ContactList", UtilMisc.toMap("isPublic", "Y"), UtilMisc.toList("contactListName"));
+ context.put("publicContactLists", publicContactLists);
+
+ partyAndContactMechList = delegator.findByAnd("PartyAndContactMech", UtilMisc.toMap("partyId", partyId), UtilMisc.toList("-fromDate"));
+ partyAndContactMechList = EntityUtil.filterByDate(partyAndContactMechList, true);
+ context.put("partyAndContactMechList", partyAndContactMechList);
}
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?view=diff&rev=538129&r1=538128&r2=538129
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Tue May 15 03:48:51 2007
@@ -1422,9 +1422,9 @@
<response name="success" type="view" value="searchContent"/>
</request-map>
- <request-map uri="createPartyAsset">
+ <request-map uri="uploadPartyContent">
<security https="true" auth="true"/>
- <event type="service" invoke="createPartyContent"/>
+ <event type="service" invoke="uploadPartyContentFile"/>
<response name="success" type="view" value="viewprofile"/>
<response name="error" type="view" value="viewprofile"/>
</request-map>
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl?view=diff&rev=538129&r1=538128&r2=538129
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl Tue May 15 03:48:51 2007
@@ -433,13 +433,27 @@
</#if>
</table>
<div> </div>
- <div align="right" class="head3"><b><u>${uiLabelMap.EcommerceUploadNewFile}</u></b>
- <div> </div>
- <form method="post" enctype="multipart/form-data" action="<@o...@ofbizUrl>" style="margin: 0;">
+ <div class="tableheadtext">${uiLabelMap.EcommerceUploadNewFile}</div>
+ <div>
+ <form method="post" enctype="multipart/form-data" action="<@o...@ofbizUrl>" style="margin: 0;">
+ <input type="hidden" name="partyId" value="${party.partyId}"/>
<input type="hidden" name="dataCategoryId" value="PERSONAL"/>
<input type="hidden" name="contentTypeId" value="DOCUMENT"/>
<input type="hidden" name="statusId" value="CTNT_PUBLISHED"/>
+ <input type="hidden" name="roleTypeId" value="OWNER"/>
<input type="file" name="uploadedFile" size="50" class="inputBox"/>
+ <select name="contentPurposeEnumId" class="selectBox">
+ <option value="">${uiLabelMap.PartySelectPurpose}</option>
+ <#list contentPurposes as contentPurpose>
+ <option value="${contentPurpose.enumId}">${contentPurpose.get("description", locale)?default(contentPurpose.enumId)}</option>
+ </#list>
+ </select>
+ <select name="mimeTypeId" class="selectBox">
+ <option value="">${uiLabelMap.PartySelectMimeType}</option>
+ <#list mimeTypes as mimeType>
+ <option value="${mimeType.mimeTypeId}">${mimeType.get("description", locale)?default(mimeType.mimeTypeId)}</option>
+ </#list>
+ </select>
<input type="submit" value="${uiLabelMap.CommonUpload}" class="smallSubmit"/>
</form>
</div>