Modified: ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/findparty.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/findparty.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/findparty.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/findparty.ftl Wed Mar 24 09:23:07 2010 @@ -146,7 +146,7 @@ under the License. <td><input type="text" name="softIdentifier" value="${parameters.softIdentifier?if_exists}"/></td> </tr> <#if extInfo == "P"> - <tr><td colspan="3"><hr/></td></tr> + <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> @@ -178,7 +178,7 @@ under the License. </tr> </#if> <#if extInfo == "T"> - <tr><td colspan="3"><hr/></td></tr> + <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> @@ -193,7 +193,7 @@ under the License. </tr> </#if> <#if extInfo == "O"> - <tr><td colspan="3"><hr/></td></tr> + <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> @@ -214,7 +214,7 @@ under the License. <#if partyList?exists> <#if hideFields != "Y"> - <hr/> + <hr /> </#if> <div id="findPartyResults"> <h2>${uiLabelMap.CommonSearchResults}</h2> Modified: ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/linkparty.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/linkparty.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/linkparty.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/linkparty.ftl Wed Mar 24 09:23:07 2010 @@ -21,7 +21,7 @@ under the License. <#assign partyId = requestParameters.partyId?if_exists> <#assign partyIdTo = requestParameters.partyIdTo?if_exists> -<br/> +<br /> <#if hasUpdatePermission> <div id="linkParty" class="screenlet"> <div class="screenlet-title-bar"> @@ -36,7 +36,7 @@ under the License. <div class="h1 alert"> ${uiLabelMap.PartyLinkMessage1} </div> - <br/> + <br /> <div> <span class="label">${uiLabelMap.PartyLink}</span> <input type="hidden" name="partyId" value="${partyFrom.partyId}"/> @@ -61,7 +61,7 @@ under the License. </#if> ${partyTo.partyId} </div> - <br/> + <br /> <div> <a href="javascript:document.linkparty.submit()" class="smallSubmit">${uiLabelMap.CommonConfirm}</a> </div> Modified: ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl Wed Mar 24 09:23:07 2010 @@ -39,7 +39,7 @@ under the License. <#list contactMeches as contactMechMap> <#assign contactMech = contactMechMap.contactMech> <#assign partyContactMech = contactMechMap.partyContactMech> - <tr><td colspan="4"><hr/></td></tr> + <tr><td colspan="4"><hr /></td></tr> <tr> <td class="label align-top">${contactMechMap.contactMechType.get("description",locale)}</td> <td> Modified: ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/profileblocks/Content.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/profileblocks/Content.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/profileblocks/Content.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/party/profileblocks/Content.ftl Wed Mar 24 09:23:07 2010 @@ -25,7 +25,7 @@ under the License. </div> <div class="screenlet-body"> ${screens.render("component://party/widget/partymgr/ProfileScreens.xml#ContentList")} - <hr/> + <hr /> <div class="label">${uiLabelMap.PartyAttachContent}</div> <form id="uploadPartyContent" method="post" enctype="multipart/form-data" action="<@ofbizUrl>uploadPartyContent</@ofbizUrl>"> <input type="hidden" name="dataCategoryId" value="PERSONAL"/> Modified: ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/visit/showvisits.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/visit/showvisits.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/visit/showvisits.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/visit/showvisits.ftl Wed Mar 24 09:23:07 2010 @@ -34,7 +34,7 @@ under the License. <br class="clear"/> </div> <div class="screenlet-body"> - <br/> + <br /> <div class="align-float"> <span class="label"> <#if (visitSize > 0)> @@ -49,7 +49,7 @@ under the License. </span> </div> <br class="clear"/> - <br/> + <br /> <table class="basic-table hover-bar" cellspacing="0"> <tr class="header-row"> <td><a href="<@ofbizUrl>showvisits?sort=visitId&showAll=${showAll}<#if partyId?has_content>&partyId=${partyId}</#if></@ofbizUrl>">${uiLabelMap.PartyVisitId}</a></td> @@ -78,7 +78,7 @@ under the License. <#assign alt_row = !alt_row> </#list> </table> - <br/> + <br /> <div class="align-float"> <span class="label"> <#if (visitSize > 0)> Modified: ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/visit/visitdetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/visit/visitdetail.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/visit/visitdetail.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/visit/visitdetail.ftl Wed Mar 24 09:23:07 2010 @@ -189,7 +189,7 @@ under the License. <td><input type="submit" value="${uiLabelMap.CommonSubmit}"></td> </tr> <tr> - <td colspan="3"><hr/></td> + <td colspan="3"><hr /></td> </tr> </form> <form name="setFollower" method="get" action="<@ofbizUrl>setAppletFollower</@ofbizUrl>"> @@ -206,4 +206,4 @@ under the License. </table> </#if> </div> -</div> \ No newline at end of file +</div> Modified: ofbiz/branches/multitenant20100310/applications/party/widget/partymgr/PartyMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/party/widget/partymgr/PartyMenus.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/party/widget/partymgr/PartyMenus.xml (original) +++ ofbiz/branches/multitenant20100310/applications/party/widget/partymgr/PartyMenus.xml Wed Mar 24 09:23:07 2010 @@ -167,8 +167,7 @@ </link> </menu-item> </menu> - <menu name="ProfileSubTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" - menu-container-style="button-bar button-style-2"> + <menu name="ProfileSubTabBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="createNew" title="${uiLabelMap.AccountingBillingAccount}" > <condition> <if-has-permission permission="ACCOUNTING" action="_VIEW"/> @@ -622,9 +621,8 @@ </menu-item> </menu> - <menu name="CommSubTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" - menu-container-style="button-bar button-style-2"> - <menu-item name="new" title="${uiLabelMap.PartyNewCommunication}"> + <menu name="CommSubTabBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="new" title="${uiLabelMap.PartyNewCommunication}" widget-style="buttontext create"> <link target="EditCommunicationEvent"/> </menu-item> <menu-item name="reply" title="${uiLabelMap.PartyReply}"> Modified: ofbiz/branches/multitenant20100310/applications/party/widget/partymgr/PartyScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/party/widget/partymgr/PartyScreens.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/party/widget/partymgr/PartyScreens.xml (original) +++ ofbiz/branches/multitenant20100310/applications/party/widget/partymgr/PartyScreens.xml Wed Mar 24 09:23:07 2010 @@ -62,7 +62,6 @@ under the License. <set field="parameters.portalPageId" value="PartyProfile"/> <set field="titleProperty" value="PageTitleViewPartyProfile"/> <set field="tabButtonItem" value="viewprofile"/> - <set field="headerItem" value="find"/> <set field="labelTitleProperty" value="PartyTaxAuthInfos"/> <set field="partyId" from-field="parameters.partyId"/> <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/prototype.js" global="true"/> Modified: ofbiz/branches/multitenant20100310/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/config/ProductUiLabels.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/branches/multitenant20100310/applications/product/config/ProductUiLabels.xml Wed Mar 24 09:23:07 2010 @@ -5467,6 +5467,9 @@ <value xml:lang="th">à¹à¸à¹à¹à¸à¸£à¸²à¸à¸²à¸ªà¸´à¸à¸à¹à¸²</value> <value xml:lang="zh">ç¼è¾äº§åä»·æ ¼</value> </property> + <property key="PageTitleEditProductPromoContent"> + <value xml:lang="en">Edit Product Promo Content</value> + </property> <property key="PageTitleEditProductPromoRules"> <value xml:lang="de">Produkt Aktionsregeln bearbeiten</value> <value xml:lang="en">Edit Promo Rules</value> @@ -16388,6 +16391,12 @@ <value xml:lang="th">หà¸à¹à¸²à¸ªà¸´à¸à¸à¹à¸²</value> <value xml:lang="zh">产å页é¢</value> </property> + <property key="ProductProductPromoContentList"> + <value xml:lang="en">Product Promo Content List</value> + </property> + <property key="ProductProductPromoContentType"> + <value xml:lang="en">Product Promo Content Type</value> + </property> <property key="ProductProductPromotionsList"> <value xml:lang="de">Produkt Aktionsliste</value> <value xml:lang="en">Product Promotions List</value> Modified: ofbiz/branches/multitenant20100310/applications/product/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/entitydef/entitymodel.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/entitydef/entitymodel.xml (original) +++ ofbiz/branches/multitenant20100310/applications/product/entitydef/entitymodel.xml Wed Mar 24 09:23:07 2010 @@ -1839,6 +1839,7 @@ under the License. <field name="comments" type="comment"></field> <field name="quantityOnHandTotal" type="fixed-point"></field> <field name="availableToPromiseTotal" type="fixed-point"></field> + <field name="accountingQuantityTotal" type="fixed-point"></field> <field name="oldQuantityOnHand" col-name="QUANTITY_ON_HAND" type="fixed-point"></field> <field name="oldAvailableToPromise" col-name="AVAILABLE_TO_PROMISE" type="fixed-point"></field> <field name="serialNumber" type="value"></field> @@ -1971,6 +1972,7 @@ under the License. <field name="effectiveDate" type="date-time"></field> <field name="quantityOnHandDiff" type="fixed-point"></field> <field name="availableToPromiseDiff" type="fixed-point"></field> + <field name="accountingQuantityDiff" type="fixed-point"></field> <field name="unitCost" type="fixed-point"></field> <field name="orderId" type="id"></field> <field name="orderItemSeqId" type="id"></field> @@ -2037,12 +2039,14 @@ under the License. <alias entity-alias="IID" name="inventoryItemId" group-by="true"/> <alias entity-alias="IID" name="availableToPromiseTotal" field="availableToPromiseDiff" function="sum"/> <alias entity-alias="IID" name="quantityOnHandTotal" field="quantityOnHandDiff" function="sum"/> + <alias entity-alias="IID" name="accountingQuantityTotal" field="accountingQuantityDiff" function="sum"/> </view-entity> <view-entity entity-name="InventoryItemDetailForSum" package-name="org.ofbiz.product.inventory" title="Inventory Item And Inventory Item Detail for Summation View Entity"> <member-entity entity-alias="II" entity-name="InventoryItem"/> <member-entity entity-alias="IID" entity-name="InventoryItemDetail"/> <alias entity-alias="IID" name="quantityOnHandSum" field="quantityOnHandDiff" function="sum"/> + <alias entity-alias="IID" name="accountingQuantitySum" field="accountingQuantityDiff" function="sum"/> <alias entity-alias="II" name="inventoryItemTypeId" group-by="true"></alias> <alias entity-alias="II" name="facilityId" group-by="true"></alias> <alias entity-alias="II" name="productId" group-by="true"></alias> @@ -4746,5 +4750,27 @@ under the License. <key-map field-name="parentTypeId" rel-field-name="webAnalyticsTypeId"/> </relation> </entity> - + + <entity entity-name="ProductPromoContent" + package-name="org.ofbiz.product.promo" + title="Product Promo Content Entity"> + <field name="productPromoId" type="id-ne"/> + <field name="contentId" type="id-ne"/> + <field name="productPromoContentTypeId" type="id-ne"/> + <field name="fromDate" type="date-time"/> + <field name="thruDate" type="date-time"/> + <prim-key field="productPromoId"/> + <prim-key field="contentId"/> + <prim-key field="productPromoContentTypeId"/> + <prim-key field="fromDate"/> + <relation type="one" fk-name="PRODPR_CNT_PROD_PR" rel-entity-name="ProductPromo"> + <key-map field-name="productPromoId"/> + </relation> + <relation type="one" fk-name="PRODPR_CNT_CNT" rel-entity-name="Content"> + <key-map field-name="contentId"/> + </relation> + <relation type="one" fk-name="PRODPR_CNT_TYPE" rel-entity-name="ProductContentType"> + <key-map field-name="productPromoContentTypeId" rel-field-name="productContentTypeId"/> + </relation> + </entity> </entitymodel> Modified: ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original) +++ ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Wed Mar 24 09:23:07 2010 @@ -303,6 +303,7 @@ under the License. <!-- if availableToPromiseDiff or quantityOnHandDiff are empty set to 0 --> <if-empty field="newEntity.availableToPromiseDiff"><set field="newEntity.availableToPromiseDiff" value="0" type="BigDecimal"/></if-empty> <if-empty field="newEntity.quantityOnHandDiff"><set field="newEntity.quantityOnHandDiff" value="0" type="BigDecimal"/></if-empty> + <if-empty field="newEntity.accountingQuantityDiff"><set field="newEntity.accountingQuantityDiff" value="0" type="BigDecimal"/></if-empty> <create-value value-field="newEntity"/> </simple-method> @@ -312,6 +313,7 @@ under the License. <set field="inventoryItem.availableToPromiseTotal" from-field="inventoryItemDetailSummary.availableToPromiseTotal"/> <set field="inventoryItem.quantityOnHandTotal" from-field="inventoryItemDetailSummary.quantityOnHandTotal"/> + <set field="inventoryItem.accountingQuantityTotal" from-field="inventoryItemDetailSummary.accountingQuantityTotal"/> <store-value value-field="inventoryItem"/> </simple-method> Modified: ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml (original) +++ ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml Wed Mar 24 09:23:07 2010 @@ -167,4 +167,39 @@ under the License. </if-not-empty> <field-to-result field="parameters.productId" result-name="productId"/> </simple-method> + + <!-- ProductPromoContent --> + <simple-method method-name="createProductPromoContent" short-description="Create Content For Product Promo"> + <make-value value-field="newEntity" entity-name="ProductPromoContent"/> + <set-pk-fields map="parameters" value-field="newEntity"/> + <set-nonpk-fields map="parameters" value-field="newEntity"/> + <if-empty field="newEntity.fromDate"> + <now-timestamp field="nowTimestamp"/> + <set field="newEntity.fromDate" from-field="nowTimestamp"/> + </if-empty> + <create-value value-field="newEntity"/> + <field-to-result field="newEntity.contentId" result-name="contentId"/> + <field-to-result field="newEntity.productPromoId" result-name="productPromoId"/> + <field-to-result field="newEntity.productPromoContentTypeId" result-name="productPromoContentTypeId"/> + </simple-method> + + <simple-method method-name="updateProductPromoContent" short-description="Update Content For Product Promo"> + <make-value value-field="lookupPKMap" entity-name="ProductPromoContent"/> + <set-pk-fields map="parameters" value-field="lookupPKMap"/> + <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/> + <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> + <store-value value-field="lookedUpValue"/> + </simple-method> + + <simple-method method-name="removeProductPromoContent" short-description="Remove Content From Product Promo"> + <make-value value-field="lookupPKMap" entity-name="ProductPromoContent"/> + <set-pk-fields map="parameters" value-field="lookupPKMap"/> + <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/> + <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> + <if-empty field="lookedUpValue.thruDate"> + <now-timestamp field="nowTimestamp"/> + <set from-field="nowTimestamp" field="lookedUpValue.thruDate"/> + </if-empty> + <store-value value-field="lookedUpValue"/> + </simple-method> </simple-methods> Modified: ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/storage/FacilityEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/storage/FacilityEvents.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/storage/FacilityEvents.xml (original) +++ ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/storage/FacilityEvents.xml Wed Mar 24 09:23:07 2010 @@ -23,9 +23,10 @@ under the License. <simple-method method-name="createFacilityContent" short-description="Create Facility Content"> <call-simple-method method-name="createGenericContent" xml-resource="component://content/script/org/ofbiz/content/layout/LayoutEvents.xml"/> + <set field="facilityContext.contentId" from-field="context.contentId"/> <set field="facilityContext.facilityId" from-field="formInput.formInput.facilityId"/> - <set field="facilityContext.contentId" from-field="context.contentId"/> - + <set field="facilityContext.fromDate" from-field="formInput.formInput.fromDate" type="Timestamp"/> + <set field="facilityContext.thruDate" from-field="formInput.formInput.thruDate" type="Timestamp"/> <!-- Create FacilityContent --> <call-service service-name="createFacilityContent" in-map-name="facilityContext"> <result-to-field result-name="contentId" field="contentId"/> Modified: ofbiz/branches/multitenant20100310/applications/product/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/servicedef/services.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/servicedef/services.xml (original) +++ ofbiz/branches/multitenant20100310/applications/product/servicedef/services.xml Wed Mar 24 09:23:07 2010 @@ -1289,4 +1289,33 @@ under the License. <auto-attributes include="pk" mode="IN" optional="false"/> </service> + <!-- Product Promo Content services --> + <service name="createProductPromoContent" default-entity-name="ProductPromoContent" engine="simple" + location="component://product/script/org/ofbiz/product/product/ProductContentServices.xml" invoke="createProductPromoContent" auth="true"> + <description>Create Product Promo Content</description> + <auto-attributes include="pk" mode="INOUT" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="fromDate" optional="true"/> + </service> + <service name="updateProductPromoContent" default-entity-name="ProductPromoContent" engine="simple" + location="component://product/script/org/ofbiz/product/product/ProductContentServices.xml" invoke="updateProductPromoContent" auth="true"> + <description>Update Product Promo Content</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="removeProductPromoContent" default-entity-name="ProductPromoContent" engine="simple" + location="component://product/script/org/ofbiz/product/product/ProductContentServices.xml" invoke="removeProductPromoContent" auth="true"> + <description>Remove Product Promo Content</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="addImageForProductPromo" default-entity-name="ProductPromoContent" engine="java" + location="org.ofbiz.product.product.ProductServices" invoke="addImageForProductPromo" auth="true"> + <implements service="uploadFileInterface"/> + <auto-attributes include="pk" mode="IN" optional="true"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <attribute name="contentId" mode="IN" optional="true" type="String"/> + <override name="productPromoContentTypeId" optional="false"/> + <override name="productPromoId" optional="false"/> + </service> </services> Modified: ofbiz/branches/multitenant20100310/applications/product/servicedef/services_view.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/servicedef/services_view.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/servicedef/services_view.xml (original) +++ ofbiz/branches/multitenant20100310/applications/product/servicedef/services_view.xml Wed Mar 24 09:23:07 2010 @@ -122,6 +122,7 @@ under the License. <attribute name="categoryId" type="String" mode="IN"/> <attribute name="productId" type="String" mode="IN"/> <attribute name="activeOnly" type="Boolean" mode="IN" optional="true"/> + <attribute name="introductionDateLimit" type="java.sql.Timestamp" mode="IN" optional="true"/> <attribute name="orderByFields" type="List" mode="IN" optional="true"/> <attribute name="category" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/> <attribute name="previousProductId" type="String" mode="OUT" optional="true"/> @@ -139,6 +140,7 @@ under the License. <attribute name="viewSizeString" type="String" mode="IN" optional="true"/> <attribute name="useCacheForMembers" type="Boolean" mode="IN" optional="true"/> <attribute name="activeOnly" type="Boolean" mode="IN" optional="true"/> + <attribute name="introductionDateLimit" type="java.sql.Timestamp" mode="IN" optional="true"/> <attribute name="orderByFields" type="List" mode="IN" optional="true"/> <attribute name="productCategory" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/> <attribute name="productCategoryMembers" type="java.util.Collection" mode="OUT" optional="true"/> <!-- this list will only contain the limited members if limitView=true --> Modified: ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/category/CategoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original) +++ ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/category/CategoryServices.java Wed Mar 24 09:23:07 2010 @@ -79,6 +79,7 @@ public class CategoryServices { String productId = (String) context.get("productId"); boolean activeOnly = (context.get("activeOnly") != null ? ((Boolean) context.get("activeOnly")).booleanValue() : true); Integer index = (Integer) context.get("index"); + Timestamp introductionDateLimit = (Timestamp) context.get("introductionDateLimit"); if (index == null && productId == null) { return ServiceUtil.returnError("Both Index and ProductID cannot be null."); @@ -86,7 +87,7 @@ public class CategoryServices { List<String> orderByFields = UtilGenerics.checkList(context.get("orderByFields")); if (orderByFields == null) orderByFields = FastList.newInstance(); - String entityName = getCategoryFindEntityName(delegator, orderByFields); + String entityName = getCategoryFindEntityName(delegator, orderByFields, introductionDateLimit); GenericValue productCategory; List<GenericValue> productCategoryMembers; @@ -101,7 +102,10 @@ public class CategoryServices { if (activeOnly) { productCategoryMembers = EntityUtil.filterByDate(productCategoryMembers, true); } - + if (introductionDateLimit != null) { + EntityCondition condition = EntityCondition.makeCondition(EntityCondition.makeCondition("introductionDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("introductionDate", EntityOperator.LESS_THAN_EQUAL_TO, introductionDateLimit)); + productCategoryMembers = EntityUtil.filterByCondition(productCategoryMembers, condition); + } if (productId != null && index == null) { for (GenericValue v: productCategoryMembers) { @@ -140,9 +144,9 @@ public class CategoryServices { return result; } - private static String getCategoryFindEntityName(Delegator delegator, List<String> orderByFields) { + private static String getCategoryFindEntityName(Delegator delegator, List<String> orderByFields, Timestamp introductionDateLimit) { // allow orderByFields to contain fields from the Product entity, if there are such fields - String entityName = "ProductCategoryMember"; + String entityName = introductionDateLimit == null ? "ProductCategoryMember" : "ProductAndCategoryMember"; if (orderByFields == null) { return entityName; } @@ -191,10 +195,11 @@ public class CategoryServices { String productCategoryId = (String) context.get("productCategoryId"); boolean limitView = ((Boolean) context.get("limitView")).booleanValue(); int defaultViewSize = ((Integer) context.get("defaultViewSize")).intValue(); + Timestamp introductionDateLimit = (Timestamp) context.get("introductionDateLimit"); List<String> orderByFields = UtilGenerics.checkList(context.get("orderByFields")); if (orderByFields == null) orderByFields = FastList.newInstance(); - String entityName = getCategoryFindEntityName(delegator, orderByFields); + String entityName = getCategoryFindEntityName(delegator, orderByFields, introductionDateLimit); String prodCatalogId = (String) context.get("prodCatalogId"); @@ -255,6 +260,10 @@ public class CategoryServices { if (activeOnly) { productCategoryMembers = EntityUtil.filterByDate(productCategoryMembers, true); } + if (introductionDateLimit != null) { + EntityCondition condition = EntityCondition.makeCondition(EntityCondition.makeCondition("introductionDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("introductionDate", EntityOperator.LESS_THAN_EQUAL_TO, introductionDateLimit)); + productCategoryMembers = EntityUtil.filterByCondition(productCategoryMembers, condition); + } // filter out the view allow before getting the sublist if (UtilValidate.isNotEmpty(viewProductCategoryId)) { @@ -284,6 +293,9 @@ public class CategoryServices { mainCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp)); mainCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, nowTimestamp))); } + if (introductionDateLimit != null) { + mainCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("introductionDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("introductionDate", EntityOperator.LESS_THAN_EQUAL_TO, introductionDateLimit))); + } EntityCondition mainCond = EntityCondition.makeCondition(mainCondList, EntityOperator.AND); // set distinct on Modified: ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/category/CategoryWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original) +++ ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Wed Mar 24 09:23:07 2010 @@ -51,12 +51,6 @@ public class CategoryWorker { public static final String module = CategoryWorker.class.getName(); - /** @deprecated */ - @Deprecated - public static String getCatalogTopCategory(PageContext pageContext, String defaultTopCategory) { - return getCatalogTopCategory(pageContext.getRequest(), defaultTopCategory); - } - public static String getCatalogTopCategory(ServletRequest request, String defaultTopCategory) { HttpServletRequest httpRequest = (HttpServletRequest) request; Map<String, Object> requestParameters = UtilHttp.getParameterMap(httpRequest); @@ -84,12 +78,6 @@ public class CategoryWorker { return topCatName; } - /** @deprecated */ - @Deprecated - public static void getCategoriesWithNoParent(PageContext pageContext, String attributeName) { - getCategoriesWithNoParent(pageContext.getRequest(), attributeName); - } - public static void getCategoriesWithNoParent(ServletRequest request, String attributeName) { Delegator delegator = (Delegator) request.getAttribute("delegator"); Collection<GenericValue> results = FastList.newInstance(); @@ -97,12 +85,10 @@ public class CategoryWorker { try { Collection<GenericValue> allCategories = delegator.findList("ProductCategory", null, null, null, null, false); - if (allCategories == null) - return; for (GenericValue curCat: allCategories) { Collection<GenericValue> parentCats = curCat.getRelatedCache("CurrentProductCategoryRollup"); - if (parentCats == null || parentCats.size() <= 0) + if (parentCats.isEmpty()) results.add(curCat); } } catch (GenericEntityException e) { @@ -111,12 +97,6 @@ public class CategoryWorker { request.setAttribute(attributeName, results); } - /** @deprecated */ - @Deprecated - public static void getRelatedCategories(PageContext pageContext, String attributeName, boolean limitView) { - getRelatedCategories(pageContext.getRequest(), attributeName, limitView); - } - public static void getRelatedCategories(ServletRequest request, String attributeName, boolean limitView) { Map<String, Object> requestParameters = UtilHttp.getParameterMap((HttpServletRequest) request); String requestId = null; @@ -130,12 +110,6 @@ public class CategoryWorker { getRelatedCategories(request, attributeName, requestId, limitView); } - /** @deprecated */ - @Deprecated - public static void getRelatedCategories(PageContext pageContext, String attributeName, String parentId, boolean limitView) { - getRelatedCategories(pageContext.getRequest(), attributeName, parentId, limitView); - } - public static void getRelatedCategories(ServletRequest request, String attributeName, String parentId, boolean limitView) { getRelatedCategories(request, attributeName, parentId, limitView, false); } @@ -143,16 +117,10 @@ public class CategoryWorker { public static void getRelatedCategories(ServletRequest request, String attributeName, String parentId, boolean limitView, boolean excludeEmpty) { List<GenericValue> categories = getRelatedCategoriesRet(request, attributeName, parentId, limitView, excludeEmpty); - if (categories.size() > 0) + if (!categories.isEmpty()) request.setAttribute(attributeName, categories); } - /** @deprecated */ - @Deprecated - public static List<GenericValue> getRelatedCategoriesRet(PageContext pageContext, String attributeName, String parentId, boolean limitView) { - return getRelatedCategoriesRet(pageContext.getRequest(), attributeName, parentId, limitView); - } - public static List<GenericValue> getRelatedCategoriesRet(ServletRequest request, String attributeName, String parentId, boolean limitView) { return getRelatedCategoriesRet(request, attributeName, parentId, limitView, false); } @@ -178,9 +146,8 @@ public class CategoryWorker { } } catch (GenericEntityException e) { Debug.logWarning(e.getMessage(), module); - rollups = null; } - if (UtilValidate.isNotEmpty(rollups)) { + if (rollups != null) { // Debug.log("Rollup size: " + rollups.size(), module); for (GenericValue parent: rollups) { // Debug.log("Adding child of: " + parent.getString("parentProductCategoryId"), module); @@ -190,7 +157,6 @@ public class CategoryWorker { cv = parent.getRelatedOneCache("CurrentProductCategory"); } catch (GenericEntityException e) { Debug.logWarning(e.getMessage(), module); - cv = null; } if (cv != null) { if (excludeEmpty) { @@ -271,12 +237,6 @@ public class CategoryWorker { return andCond; } - /** @deprecated */ - @Deprecated - public static void setTrail(PageContext pageContext, String currentCategory) { - setTrail(pageContext.getRequest(), currentCategory); - } - public static void setTrail(ServletRequest request, String currentCategory) { Map<String, Object> requestParameters = UtilHttp.getParameterMap((HttpServletRequest) request); String previousCategory = (String) requestParameters.get("pcategory"); @@ -309,12 +269,7 @@ public class CategoryWorker { // if cur category is in crumb, remove everything after it and return int cindex = trail.lastIndexOf(currentCategoryId); - if (cindex < (trail.size() - 1)) { - for (int i = trail.size() - 1; i > cindex; i--) { - String deadCat = trail.remove(i); - //if (Debug.infoOn()) Debug.logInfo("[CategoryWorker.setTrail] Removed after current category index: " + i + " catname: " + deadCat, module); - } - } + trail = trail.subList(0, cindex); return trail; } else { // current category is not in the list, and no previous category was specified, go back to the beginning @@ -338,13 +293,7 @@ public class CategoryWorker { } else { // remove all categories after the previous category, preparing for adding the current category int index = trail.indexOf(previousCategoryId); - - if (index < (trail.size() - 1)) { - for (int i = trail.size() - 1; i > index; i--) { - String deadCat = trail.remove(i); - //if (Debug.infoOn()) Debug.logInfo("[CategoryWorker.setTrail] Removed after previous category index: " + i + " catname: " + deadCat, module); - } - } + trail = trail.subList(0, index); } // add the current category to the end of the list @@ -354,36 +303,18 @@ public class CategoryWorker { return trail; } - /** @deprecated */ - @Deprecated - public static List<String> getTrail(PageContext pageContext) { - return getTrail(pageContext.getRequest()); - } - public static List<String> getTrail(ServletRequest request) { HttpSession session = ((HttpServletRequest) request).getSession(); List<String> crumb = UtilGenerics.checkList(session.getAttribute("_BREAD_CRUMB_TRAIL_")); return crumb; } - /** @deprecated */ - @Deprecated - public static List<String> setTrail(PageContext pageContext, List<String> crumb) { - return setTrail(pageContext.getRequest(), crumb); - } - public static List<String> setTrail(ServletRequest request, List<String> crumb) { HttpSession session = ((HttpServletRequest) request).getSession(); session.setAttribute("_BREAD_CRUMB_TRAIL_", crumb); return crumb; } - /** @deprecated */ - @Deprecated - public static boolean checkTrailItem(PageContext pageContext, String category) { - return checkTrailItem(pageContext.getRequest(), category); - } - public static boolean checkTrailItem(ServletRequest request, String category) { List<String> crumb = getTrail(request); @@ -394,12 +325,6 @@ public class CategoryWorker { } } - /** @deprecated */ - @Deprecated - public static String lastTrailItem(PageContext pageContext) { - return lastTrailItem(pageContext.getRequest()); - } - public static String lastTrailItem(ServletRequest request) { List<String> crumb = getTrail(request); @@ -421,7 +346,7 @@ public class CategoryWorker { GenericValue product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId)); List<GenericValue> productAssocs = ProductWorker.getVariantVirtualAssocs(product); //this does take into account that a product could be a variant of multiple products, but this shouldn't ever really happen... - if (UtilValidate.isNotEmpty(productAssocs)) { + if (productAssocs != null) { for (GenericValue productAssoc: productAssocs) { if (isProductInCategory(delegator, productAssoc.getString("productId"), productCategoryId)) { return true; Modified: ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/price/PriceServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/price/PriceServices.java (original) +++ ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/price/PriceServices.java Wed Mar 24 09:23:07 2010 @@ -1198,7 +1198,9 @@ public class PriceServices { if (partyId.equals(groupPartyId)) { compare = 0; } else { - // look for PartyRelationship with partyRelationshipTypeId=GROUP_ROLLUP, the partyIdTo is the group member, so the partyIdFrom is the groupPartyId + // look for PartyRelationship with + // partyRelationshipTypeId=GROUP_ROLLUP, the partyIdTo is + // the group member, so the partyIdFrom is the groupPartyId List<GenericValue> partyRelationshipList = delegator.findByAndCache("PartyRelationship", UtilMisc.toMap("partyIdFrom", groupPartyId, "partyIdTo", partyId, "partyRelationshipTypeId", "GROUP_ROLLUP")); // and from/thru date within range partyRelationshipList = EntityUtil.filterByDate(partyRelationshipList, nowTimestamp, null, null, true); @@ -1206,15 +1208,7 @@ public class PriceServices { if (UtilValidate.isNotEmpty(partyRelationshipList)) { compare = 0; } else { - // before setting 1 try one more query: look for a 2 hop relationship - List<GenericValue> partyRelationshipTwoHopList = delegator.findByAndCache("PartyRelationshipToFrom", UtilMisc.toMap("onePartyIdFrom", groupPartyId, "twoPartyIdTo", partyId, "onePartyRelationshipTypeId", "GROUP_ROLLUP", "twoPartyRelationshipTypeId", "GROUP_ROLLUP")); - partyRelationshipTwoHopList = EntityUtil.filterByDate(partyRelationshipTwoHopList, nowTimestamp, "oneFromDate", "oneThruDate", true); - partyRelationshipTwoHopList = EntityUtil.filterByDate(partyRelationshipTwoHopList, nowTimestamp, "twoFromDate", "twoThruDate", true); - if (UtilValidate.isNotEmpty(partyRelationshipTwoHopList)) { - compare = 0; - } else { - compare = 1; - } + compare = checkConditionPartyHierarchy(delegator, nowTimestamp, groupPartyId, partyId); } } } @@ -1281,6 +1275,22 @@ public class PriceServices { return false; } + private static int checkConditionPartyHierarchy(Delegator delegator, Timestamp nowTimestamp, String groupPartyId, String partyId) throws GenericEntityException{ + List<GenericValue> partyRelationshipList = delegator.findByAndCache("PartyRelationship", UtilMisc.toMap("partyIdTo", partyId, "partyRelationshipTypeId", "GROUP_ROLLUP")); + partyRelationshipList = EntityUtil.filterByDate(partyRelationshipList, nowTimestamp, null, null, true); + for (GenericValue genericValue : partyRelationshipList) { + String partyIdFrom = (String)genericValue.get("partyIdFrom"); + if (partyIdFrom.equals(groupPartyId)) { + return 0; + } + if (0 == checkConditionPartyHierarchy(delegator, nowTimestamp, groupPartyId, partyIdFrom)) { + return 0; + } + } + + return 1; + } + /** * Calculates the purchase price of a product */ Modified: ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/product/ProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/product/ProductServices.java (original) +++ ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/product/ProductServices.java Wed Mar 24 09:23:07 2010 @@ -44,7 +44,9 @@ import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.condition.EntityExpr; import org.ofbiz.entity.condition.EntityJoinOperator; +import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.product.image.ScaleImage; import org.ofbiz.product.catalog.CatalogWorker; @@ -1164,5 +1166,183 @@ public class ProductServices { return result; } -} + public static Map<String, Object> addImageForProductPromo(DispatchContext dctx, Map<String, ? extends Object> context) + throws IOException, JDOMException { + LocalDispatcher dispatcher = dctx.getDispatcher(); + Delegator delegator = dctx.getDelegator(); + GenericValue userLogin = (GenericValue) context.get("userLogin"); + String productPromoId = (String) context.get("productPromoId"); + String productPromoContentTypeId = (String) context.get("productPromoContentTypeId"); + ByteBuffer imageData = (ByteBuffer) context.get("uploadedFile"); + String contentId = (String) context.get("contentId"); + + if (UtilValidate.isNotEmpty(context.get("_uploadedFile_fileName"))) { + String imageFilenameFormat = UtilProperties.getPropertyValue("catalog", "image.filename.format"); + String imageServerPath = FlexibleStringExpander.expandString(UtilProperties.getPropertyValue("catalog", "image.server.path"), context); + String imageUrlPrefix = UtilProperties.getPropertyValue("catalog", "image.url.prefix"); + + FlexibleStringExpander filenameExpander = FlexibleStringExpander.getInstance(imageFilenameFormat); + String id = productPromoId + "_Image_" + productPromoContentTypeId.charAt(productPromoContentTypeId.length() - 1); + String fileLocation = filenameExpander.expandString(UtilMisc.toMap("location", "products", "type", "promo", "id", id)); + String filePathPrefix = ""; + String filenameToUse = fileLocation; + if (fileLocation.lastIndexOf("/") != -1) { + filePathPrefix = fileLocation.substring(0, fileLocation.lastIndexOf("/") + 1); // adding 1 to include the trailing slash + filenameToUse = fileLocation.substring(fileLocation.lastIndexOf("/") + 1); + } + + List<GenericValue> fileExtension = FastList.newInstance(); + try { + fileExtension = delegator.findList("FileExtension", EntityCondition.makeCondition("mimeTypeId", EntityOperator.EQUALS, (String) context.get("_uploadedFile_contentType")), null, null, null, false); + } catch (GenericEntityException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + + GenericValue extension = EntityUtil.getFirst(fileExtension); + if (extension != null) { + filenameToUse += "." + extension.getString("fileExtensionId"); + } + + File makeResourceDirectory = new File(imageServerPath + "/" + filePathPrefix); + if (!makeResourceDirectory.exists()) { + makeResourceDirectory.mkdirs(); + } + + File file = new File(imageServerPath + "/" + filePathPrefix + filenameToUse); + + try { + RandomAccessFile out = new RandomAccessFile(file, "rw"); + out.write(imageData.array()); + out.close(); + } catch (FileNotFoundException e) { + Debug.logError(e, module); + return ServiceUtil.returnError("Unable to open file for writing: " + file.getAbsolutePath()); + } catch (IOException e) { + Debug.logError(e, module); + return ServiceUtil.returnError("Unable to write binary data to: " + file.getAbsolutePath()); + } + + String imageUrl = imageUrlPrefix + "/" + filePathPrefix + filenameToUse; + + if (UtilValidate.isNotEmpty(imageUrl) && imageUrl.length() > 0) { + Map<String, Object> dataResourceCtx = FastMap.newInstance(); + dataResourceCtx.put("objectInfo", imageUrl); + dataResourceCtx.put("dataResourceName", (String) context.get("_uploadedFile_fileName")); + dataResourceCtx.put("userLogin", userLogin); + + Map<String, Object> productPromoContentCtx = FastMap.newInstance(); + productPromoContentCtx.put("productPromoId", productPromoId); + productPromoContentCtx.put("productPromoContentTypeId", productPromoContentTypeId); + productPromoContentCtx.put("fromDate", (Timestamp) context.get("fromDate")); + productPromoContentCtx.put("thruDate", (Timestamp) context.get("thruDate")); + productPromoContentCtx.put("userLogin", userLogin); + + if (UtilValidate.isNotEmpty(contentId)) { + GenericValue content = null; + try { + content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false); + } catch (GenericEntityException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + + if (UtilValidate.isNotEmpty(content)) { + GenericValue dataResource = null; + try { + dataResource = content.getRelatedOne("DataResource"); + } catch (GenericEntityException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + + if (UtilValidate.isNotEmpty(dataResource)) { + dataResourceCtx.put("dataResourceId", dataResource.getString("dataResourceId")); + try { + dispatcher.runSync("updateDataResource", dataResourceCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + } else { + dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); + dataResourceCtx.put("mimeTypeId", "text/html"); + Map<String, Object> dataResourceResult = FastMap.newInstance(); + try { + dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + + Map<String, Object> contentCtx = FastMap.newInstance(); + contentCtx.put("contentId", contentId); + contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); + contentCtx.put("userLogin", userLogin); + try { + dispatcher.runSync("updateContent", contentCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + } + + productPromoContentCtx.put("contentId", contentId); + try { + dispatcher.runSync("updateProductPromoContent", productPromoContentCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + } + } else { + dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); + dataResourceCtx.put("mimeTypeId", "text/html"); + Map<String, Object> dataResourceResult = FastMap.newInstance(); + try { + dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + + Map<String, Object> contentCtx = FastMap.newInstance(); + contentCtx.put("contentTypeId", "DOCUMENT"); + contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); + contentCtx.put("userLogin", userLogin); + Map<String, Object> contentResult = FastMap.newInstance(); + try { + contentResult = dispatcher.runSync("createContent", contentCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + + productPromoContentCtx.put("contentId", contentResult.get("contentId")); + try { + dispatcher.runSync("createProductPromoContent", productPromoContentCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + } + } + } else { + Map<String, Object> productPromoContentCtx = FastMap.newInstance(); + productPromoContentCtx.put("productPromoId", productPromoId); + productPromoContentCtx.put("productPromoContentTypeId", productPromoContentTypeId); + productPromoContentCtx.put("contentId", contentId); + productPromoContentCtx.put("fromDate", (Timestamp) context.get("fromDate")); + productPromoContentCtx.put("thruDate", (Timestamp) context.get("thruDate")); + productPromoContentCtx.put("userLogin", userLogin); + try { + dispatcher.runSync("updateProductPromoContent", productPromoContentCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + ServiceUtil.returnError(e.getMessage()); + } + } + return ServiceUtil.returnSuccess(); + } +} Modified: ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java (original) +++ ofbiz/branches/multitenant20100310/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java Wed Mar 24 09:23:07 2010 @@ -48,7 +48,7 @@ public class SubscriptionServices { public static final String module = SubscriptionServices.class.getName(); - public static Map<String, Object> processExtendSubscription(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException{ + public static Map<String, Object> processExtendSubscription(DispatchContext dctx, Map<String, ? extends Object> context) { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); @@ -119,8 +119,7 @@ public class SubscriptionServices { calendar.add(times[0], (useTime.intValue() * times[1])); } else { Debug.logWarning("Don't know anything about useTimeUomId [" + useTimeUomId + "], defaulting to month", module); - // FIXME: times[] can only be null here - //calendar.add(Calendar.MONTH, (useTime.intValue() * times[1])); + calendar.add(Calendar.MONTH, useTime); } thruDate = new Timestamp(calendar.getTimeInMillis()); @@ -237,7 +236,7 @@ public class SubscriptionServices { String msg = "No OrderRole found for orderId:" + orderId; return ServiceUtil.returnFailure(msg); } - orderHeader = delegator.findByPrimaryKeyCache("OrderHeader", UtilMisc.toMap("orderId", orderId)); + orderHeader = delegator.findByPrimaryKey("OrderHeader", UtilMisc.toMap("orderId", orderId)); if (orderHeader == null) { String msg = "No OrderHeader found for orderId:" + orderId; return ServiceUtil.returnError(msg); Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/WEB-INF/controller.xml (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/WEB-INF/controller.xml Wed Mar 24 09:23:07 2010 @@ -2672,6 +2672,25 @@ under the License. </request-map> <!-- end of request mappings --> + + <!-- ================ Product Promo Content Requests ================= --> + <request-map uri="EditProductPromoContent"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditProductPromoContent"/> + <response name="error" type="view" value="EditProductPromoContent"/> + </request-map> + <request-map uri="removeContentFromProductPromo"> + <security https="true" auth="true"/> + <event type="service" invoke="removeProductPromoContent"/> + <response name="success" type="view" value="EditProductPromoContent"/> + <response name="error" type="view" value="EditProductPromoContent"/> + </request-map> + <request-map uri="addImageContentForProductPromo"> + <security https="true" auth="true"/> + <event type="service" invoke="addImageForProductPromo"/> + <response name="success" type="view" value="EditProductPromoContent"/> + <response name="error" type="view" value="EditProductPromoContent"/> + </request-map> <!-- View Mappings --> <view-map name="main" type="screen" page="component://product/widget/catalog/CommonScreens.xml#main"/> @@ -2771,6 +2790,7 @@ under the License. <view-map name="EditProductPromoStores" type="screen" page="component://product/widget/catalog/PromoScreens.xml#EditProductPromoStores"/> <view-map name="FindProductPromoCode" type="screen" page="component://product/widget/catalog/PromoScreens.xml#FindProductPromoCode"/> <view-map name="EditProductPromoCode" type="screen" page="component://product/widget/catalog/PromoScreens.xml#EditProductPromoCode"/> + <view-map name="EditProductPromoContent" type="screen" page="component://product/widget/catalog/PromoScreens.xml#EditProductPromoContent"/> <view-map name="FindPriceRules" type="screen" page="component://product/widget/catalog/PriceScreens.xml#FindProductPriceRule"/> <view-map name="EditProductPriceRules" type="screen" page="component://product/widget/catalog/PriceScreens.xml#EditProductPriceRules"/> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategory.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategory.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategory.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategory.ftl Wed Mar 24 09:23:07 2010 @@ -175,7 +175,7 @@ function insertImageName(type,nameValue) <td> </td> <td width="74%"> <input type="text" <#if productCategory?has_content>value="${productCategory.detailScreen?if_exists}"</#if> name="detailScreen" size="60" maxlength="250"/> - <br/><span class="tooltip">${uiLabelMap.ProductDefaultsTo} "categorydetail", ${uiLabelMap.ProductDetailScreenMessage}: "component://ecommerce/widget/CatalogScreens.xml#categorydetail"</span> + <br /><span class="tooltip">${uiLabelMap.ProductDefaultsTo} "categorydetail", ${uiLabelMap.ProductDetailScreenMessage}: "component://ecommerce/widget/CatalogScreens.xml#categorydetail"</span> </td> </tr> <tr> @@ -210,7 +210,7 @@ function insertImageName(type,nameValue) <table cellspacing="0" class="basic-table"> <tr><td> <input type="file" size="50" name="fname"/> - <br/> + <br /> <span> <input type="radio" name="upload_file_type_bogus" value="category" checked="checked" onclick='setUploadUrl("<@ofbizUrl>UploadCategoryImage?productCategoryId=${productCategoryId}&upload_file_type=category</@ofbizUrl>");'/>${uiLabelMap.ProductCategoryImageUrl} <input type="radio" name="upload_file_type_bogus" value="linkOne" onclick='setUploadUrl("<@ofbizUrl>UploadCategoryImage?productCategoryId=${productCategoryId}&upload_file_type=linkOne</@ofbizUrl>");'/>${uiLabelMap.ProductLinkOneImageUrl} Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryContent.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryContent.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryContent.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryContent.ftl Wed Mar 24 09:23:07 2010 @@ -59,7 +59,7 @@ under the License. <td> </td> <td width="74%"> <input type="text" <#if productCategory?has_content>value="${productCategory.detailScreen?if_exists}"</#if> name="detailScreen" size="60" maxlength="250"> - <br/> + <br /> <span class="tooltip">${uiLabelMap.ProductDefaultsTo} "categorydetail", ${uiLabelMap.ProductDetailScreenMessage}: "component://ecommerce/widget/CatalogScreens.xml#categorydetail"</span> </td> </tr> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryProdCatalogs.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryProdCatalogs.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryProdCatalogs.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryProdCatalogs.ftl Wed Mar 24 09:23:07 2010 @@ -89,7 +89,7 @@ under the License. </#if> </#list> </table> - <br/> + <br /> </div> </div> <div class="screenlet"> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryProducts.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryProducts.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryProducts.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/EditCategoryProducts.ftl Wed Mar 24 09:23:07 2010 @@ -80,7 +80,7 @@ under the License. <a href="javascript:call_cal(document.updateCategoryProductForm.thruDate${suffix}, '${(productCategoryMember.thruDate)?default(nowTimestamp?string)}');"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a> <input type="text" size="5" name="sequenceNum${suffix}" value="${(productCategoryMember.sequenceNum)?if_exists}"> <input type="text" size="5" name="quantity${suffix}" value="${(productCategoryMember.quantity)?if_exists}"> - <br/> + <br /> <textarea name="comments${suffix}" rows="2" cols="40">${(productCategoryMember.comments)?if_exists}</textarea> </td> <td align="center"> @@ -151,7 +151,7 @@ under the License. <a href="javascript:call_fieldlookup2(document.addProductCategoryMemberForm.productId, 'LookupProduct');"><img src="<@ofbizContentUrl>/images/fieldlookup.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="${uiLabelMap.CommonClickHereForFieldLookup}"></a> <span class="label">${uiLabelMap.CommonFromDate}</span> <input type="text" size="22" name="fromDate"> <a href="javascript:call_cal(document.addProductCategoryMemberForm.fromDate, '${nowTimestamp?string}');"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a> - <br/> + <br /> <span class="label">${uiLabelMap.CommonComments}</span> <textarea name="comments" rows="2" cols="40"></textarea> <input type="submit" value="${uiLabelMap.CommonAdd}"> </div> @@ -174,10 +174,10 @@ under the License. <span class="label">${uiLabelMap.ProductTargetProductCategory}</span> <input type="text" name="productCategoryIdTo" size="20" maxlength="20"/> <a href="javascript:call_fieldlookup2(document.copyCategoryProductMembersForm.productCategoryIdTo,'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}"/></a> - <br/> + <br /> <span class="label">${uiLabelMap.ProductOptionalFilterWithDate}</span> <input type="text" size="20" name="validDate"> <a href="javascript:call_cal(document.copyCategoryProductMembersForm.validDate, '${nowTimestamp?string}');"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a> - <br/> + <br /> <span class="label">${uiLabelMap.ProductIncludeSubCategories}?</span> <select name="recurse"> <option value="N">${uiLabelMap.CommonN}</option> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/createProductInCategoryCheckExisting.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/createProductInCategoryCheckExisting.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/createProductInCategoryCheckExisting.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/category/createProductInCategoryCheckExisting.ftl Wed Mar 24 09:23:07 2010 @@ -55,7 +55,7 @@ under the License. <h3> ${uiLabelMap.ProductNoExistingProductsFound}.</h3> </#if> </div> - <br/> + <br /> <div class="screenlet-body"> <form name="createProductInCategoryForm" method="post" action="<@ofbizUrl>createProductInCategory</@ofbizUrl>" style="margin: 0;"> <input type="hidden" name="productCategoryId" value="${productCategoryId}"> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/config/EditProductConfigItemContent.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/config/EditProductConfigItemContent.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/config/EditProductConfigItemContent.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/config/EditProductConfigItemContent.ftl Wed Mar 24 09:23:07 2010 @@ -35,7 +35,7 @@ function insertImageName(size,nameValue) <div>${uiLabelMap.ProductServerDirectory}: <b>${imageServerPath?if_exists}</b></div> <div>${uiLabelMap.ProductTheUrlOfYourUploadedFile}: <b><a href="<@ofbizContentUrl>${imageUrl?if_exists}</@ofbizContentUrl>">${imageUrl?if_exists}</a></b></div> </#if> -<br/> +<br /> </#if> <#if !(configItem?exists)> @@ -70,7 +70,7 @@ function insertImageName(size,nameValue) </#if> </#list> </table> - <br/> + <br /> <#if configItemId?has_content && configItem?has_content> <div class="screenlet"> <div class="screenlet-title-bar"> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/config/EditProductConfigItemContentContent.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/config/EditProductConfigItemContentContent.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/config/EditProductConfigItemContentContent.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/config/EditProductConfigItemContentContent.ftl Wed Mar 24 09:23:07 2010 @@ -20,7 +20,7 @@ under the License. <#if contentId?has_content> <a href="/content/control/gotoContent?contentId=${contentId}" class='buttontext' target='_blank'>${uiLabelMap.ProductContent} ${uiLabelMap.CommonPage}</a> </#if> -<br/> +<br /> <#if configItemId?has_content && productContent?has_content> ${updateProductContentWrapper.renderFormString()} </#if> \ No newline at end of file Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl Wed Mar 24 09:23:07 2010 @@ -34,7 +34,7 @@ under the License. </div> <input type="hidden" name="productFeatureCategoryId" value="${productFeatureCategoryId}"> </form> - <br/> + <br /> </div> </div> <div class="screenlet"> @@ -64,7 +64,7 @@ under the License. </tr> </table> </#if> - <br/> + <br /> <table cellspacing="0" class="basic-table"> <form method='POST' action='<@ofbizUrl>UpdateProductFeatureInCategory</@ofbizUrl>' name="selectAllForm"> <input type="hidden" name="_useRowSubmit" value="Y"> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/feature/EditFeatureGroups.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/feature/EditFeatureGroups.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/feature/EditFeatureGroups.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/feature/EditFeatureGroups.ftl Wed Mar 24 09:23:07 2010 @@ -21,7 +21,7 @@ under the License. <h3>${uiLabelMap.PageTitleEditProductFeatureGroups}</h3> </div> <div class="screenlet-body"> - <br/> + <br /> <table cellspacing="0" class="basic-table"> <tr class="header-row"> <td><b>${uiLabelMap.CommonId}</b></td> @@ -48,7 +48,7 @@ under the License. </#if> </#list> </table> - <br/> + <br /> </div> </div> <div class="screenlet"> @@ -57,7 +57,7 @@ under the License. </div> <div class="screenlet-body"> <form method="post" action="<@ofbizUrl>CreateProductFeatureGroup</@ofbizUrl>"> - <br/> + <br /> <table cellspacing="0" class="basic-table"> <tr> <td class="label">${uiLabelMap.CommonDescription}:</td> @@ -68,6 +68,6 @@ under the License. </tr> </table> </form> - <br/> + <br /> </div> </div> \ No newline at end of file Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/FindProductById.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/FindProductById.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/FindProductById.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/FindProductById.ftl Wed Mar 24 09:23:07 2010 @@ -26,10 +26,10 @@ under the License. <form name="idsearchform" method="post" action="<@ofbizUrl>FindProductById</@ofbizUrl>" style="margin: 0;"> <span class="label">${uiLabelMap.CommonId} ${uiLabelMap.CommonValue}:</span> <input type="text" name="idValue" size="20" maxlength="50" value="${idValue?if_exists}"> <a href="javascript:document.idsearchform.submit()" class="buttontext">${uiLabelMap.CommonFind}</a> </form> - <br/> + <br /> <h1>${uiLabelMap.ProductSearchResultsWithIdValue}: ${idValue?if_exists}</h1> <#if !goodIdentifications?has_content && !idProduct?has_content> - <br/> + <br /> <h2> ${uiLabelMap.ProductNoResultsFound}.</h2> <#else/> <table cellspacing="0" class="basic-table"> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/advancedsearch.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/advancedsearch.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/advancedsearch.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/advancedsearch.ftl Wed Mar 24 09:23:07 2010 @@ -307,7 +307,7 @@ under the License. </#if> <tr> <td align="center" colspan="2"> - <hr/> + <hr /> <a href="javascript:document.advtokeywordsearchform.submit()" class="buttontext">${uiLabelMap.CommonFind}</a> </td> </tr> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/keywordsearch.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/keywordsearch.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/keywordsearch.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/keywordsearch.ftl Wed Mar 24 09:23:07 2010 @@ -28,7 +28,7 @@ under the License. <div><a href="<@ofbizUrl>advancedsearch?SEARCH_CATEGORY_ID=${(requestParameters.SEARCH_CATEGORY_ID)?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRefineSearch}</a></div> <#if !productIds?has_content> - <br/><h2> ${uiLabelMap.ProductNoResultsFound}.</h2> + <br /><h2> ${uiLabelMap.ProductNoResultsFound}.</h2> </#if> <#if productIds?has_content> @@ -89,7 +89,7 @@ under the License. </b> </td> </tr> - <tr><td colspan="2"><hr/></td></tr> + <tr><td colspan="2"><hr /></td></tr> </table> <form method="post" name="products"> @@ -116,7 +116,7 @@ under the License. </form> <table cellspacing="0" class="basic-table"> - <tr><td colspan="2"><hr/></td></tr> + <tr><td colspan="2"><hr /></td></tr> <tr> <td align="right"> <b> @@ -140,4 +140,4 @@ under the License. </table> </#if> </div> -</div> \ No newline at end of file +</div> Modified: ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/keywordsearchactions.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/keywordsearchactions.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/keywordsearchactions.ftl (original) +++ ofbiz/branches/multitenant20100310/applications/product/webapp/catalog/find/keywordsearchactions.ftl Wed Mar 24 09:23:07 2010 @@ -18,13 +18,13 @@ under the License. --> <#if productIds?has_content> - <hr/> + <hr /> <span class="label"><b>${uiLabelMap.ProductNote}:</b></span> ${uiLabelMap.ProductNoteKeywordSearch} - <hr/> + <hr /> ${screens.render("component://product/widget/catalog/ProductScreens.xml#CreateVirtualWithVariantsFormInclude")} - <hr/> + <hr /> <div> <form method="post" action="<@ofbizUrl>searchRemoveFromCategory</@ofbizUrl>" name="searchRemoveFromCategory"> @@ -33,11 +33,11 @@ under the License. <a href="javascript:call_fieldlookup2(document.searchRemoveFromCategory.SE_SEARCH_CATEGORY_ID,'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}"/></a> <input type="hidden" name="clearSearch" value="N"> <input type="submit" value="${uiLabelMap.CommonRemove}" class="smallSubmit"> - <br/> + <br /> </form> </div> - <hr/> + <hr /> <div> <form method="post" action="<@ofbizUrl>searchExpireFromCategory</@ofbizUrl>" name="searchExpireFromCategory"> @@ -47,11 +47,11 @@ under the License. <span class="label">${uiLabelMap.CommonThru}</span><input type="text" size="25" name="thruDate"><a href="javascript:call_cal(document.searchExpireFromCategory.thruDate, null);"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a> <input type="hidden" name="clearSearch" value="N"> <input type="submit" value="${uiLabelMap.CommonExpire}" class="smallSubmit"> - <br/> + <br /> </form> </div> - <hr/> + <hr /> <div> <form method="post" action="<@ofbizUrl>searchAddToCategory</@ofbizUrl>" name="searchAddToCategory"> @@ -61,19 +61,19 @@ under the License. <span class="label">${uiLabelMap.CommonFrom}</span><input type="text" size="25" name="fromDate"><a href="javascript:call_cal(document.searchAddToCategory.fromDate, null);"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a> <input type="hidden" name="clearSearch" value="N"> <input type="submit" value="${uiLabelMap.ProductAddToCategory}" class="smallSubmit"> - <br/> + <br /> </form> </div> - <hr/> + <hr /> <div> <form method="post" action="<@ofbizUrl>searchAddFeature</@ofbizUrl>" name="searchAddFeature"> - <span class="label">${uiLabelMap.ProductAddFeatureToResults}:</span><br/> + <span class="label">${uiLabelMap.ProductAddFeatureToResults}:</span><br /> <span class="label">${uiLabelMap.ProductFeatureId}</span><input type="text" size="10" name="productFeatureId" value=""> <span class="label">${uiLabelMap.CommonFrom}</span><input type="tex"t size="25" name="fromDate"><a href="javascript:call_cal(document.searchAddFeature.fromDate, null);"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a> <span class="label">${uiLabelMap.CommonThru}</span><input type="text" size="25" name="thruDate"><a href="javascript:call_cal(document.searchAddFeature.thruDate, null);"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a> - <br/> + <br /> <span class="label">${uiLabelMap.CommonAmount}</span><input type="text" size="5" name="amount" value=""> <span class="label">${uiLabelMap.CommonSequence}</span><input type="text" size="5" name="sequenceNum" value=""> <span class="label">${uiLabelMap.ProductFeatureApplicationType}</span> @@ -89,35 +89,35 @@ under the License. </select> <input type="hidden" name="clearSearch" value="N"> <input type="submit" value="${uiLabelMap.ProductAddFeature}" class="smallSubmit"> - <br/> + <br /> </form> </div> - <hr/> + <hr /> <div> <form method="post" action="<@ofbizUrl>searchRemoveFeature</@ofbizUrl>" name="searchRemoveFeature"> - <span class="label">${uiLabelMap.ProductRemoveFeatureFromResults}:</span><br/> + <span class="label">${uiLabelMap.ProductRemoveFeatureFromResults}:</span><br /> <span class="label">${uiLabelMap.ProductFeatureId}</span><input type="text" size="10" name="productFeatureId" value=""> <input type="hidden" name="clearSearch" value="N"> <input type="submit" value="${uiLabelMap.ProductRemoveFeature}" class="smallSubmit"> - <br/> + <br /> </form> </div> - <hr/> + <hr /> <div> <form method="post" action="" name="searchShowParams"> <#assign searchParams = Static["org.ofbiz.product.product.ProductSearchSession"].makeSearchParametersString(session)> <span class="label">${uiLabelMap.ProductPlainSearchParameters}:</span><input type="text" size="60" name="searchParameters" value="${StringUtil.wrapString(searchParams)}"> - <br/> + <br /> <span class="label">${uiLabelMap.ProductHtmlSearchParameters}:</span><input type="text" size="60" name="searchParameters" value="${StringUtil.wrapString(searchParams)?html}"> <input type="hidden" name="clearSearch" value="N"> </form> </div> - <hr/> + <hr /> <div> <span class="label">${uiLabelMap.ProductSearchExportProductList}:</span><a href="<@ofbizUrl>searchExportProductList?clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductSearchExport}</a> |
Free forum by Nabble | Edit this page |