Author: jleroux
Date: Sun Sep 14 17:22:18 2014 New Revision: 1624876 URL: http://svn.apache.org/r1624876 Log: Fixes a bug introduced with commits for OFBIZ-4902. When you replace the Freemarker if_exists built-in with the ! operator, when the ! is followed by a + you need to evaluate the expression conditioned by the ! 1st. Else the following chars are used as default value. In other words, you need to put parenthesis around the expression including the ! operator I tested with tomahawk/includes/appbarClose.ftl and header.ftl files of bluelight and droppingcrumbs themes I then applied the same scheme on catalog/categorydetail.ftl, party/editShoppingList.ftl, ebaystore/store/returnPolicy.ftl and party/findparty.ftl w/o testing. I guess it's ok I did not find the same scheme elsewhere Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl ofbiz/trunk/applications/party/webapp/partymgr/party/editShoppingList.ftl ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl ofbiz/trunk/themes/bluelight/includes/header.ftl ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl?rev=1624876&r1=1624875&r2=1624876&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl Sun Sep 14 17:22:18 2014 @@ -120,7 +120,7 @@ under the License. <@paginationControls/> <#else> <#include "component://common/webcommon/includes/htmlTemplate.ftl"/> - <#assign commonUrl = "category?category_id="+ parameters.category_id! + "&"/> + <#assign commonUrl = "category?category_id="+ (parameters.category_id!) + "&"/> <#--assign viewIndex = viewIndex - 1/--> <#assign viewIndexFirst = 0/> <#assign viewIndexPrevious = viewIndex - 1/> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/editShoppingList.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/editShoppingList.ftl?rev=1624876&r1=1624875&r2=1624876&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/party/editShoppingList.ftl (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/party/editShoppingList.ftl Sun Sep 14 17:22:18 2014 @@ -178,7 +178,7 @@ under the License. <#if shoppingListItemDatas?has_content> <#-- Pagination --> <#include "component://common/webcommon/includes/htmlTemplate.ftl"/> - <#assign commonUrl = "editShoppingList?partyId=" + partyId + "&shoppingListId="+shoppingListId!+"&"/> + <#assign commonUrl = "editShoppingList?partyId=" + partyId + "&shoppingListId="+(shoppingListId!)+"&"/> <#assign viewIndexFirst = 0/> <#assign viewIndexPrevious = viewIndex - 1/> <#assign viewIndexNext = viewIndex + 1/> @@ -261,4 +261,4 @@ under the License. </div> </div> </#if> -<!-- begin editShoppingList.ftl --> \ No newline at end of file +<!-- begin editShoppingList.ftl --> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?rev=1624876&r1=1624875&r2=1624876&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Sun Sep 14 17:22:18 2014 @@ -209,7 +209,7 @@ under the License. <#if partyList?has_content> <#-- Pagination --> <#include "component://common/webcommon/includes/htmlTemplate.ftl"/> - <#assign commonUrl = "findparty?hideFields=" + hideFields + paramList + "&sortField=" + sortField! + "&"/> + <#assign commonUrl = "findparty?hideFields=" + hideFields + paramList + "&sortField=" + (sortField!) + "&"/> <#assign viewIndexFirst = 0/> <#assign viewIndexPrevious = viewIndex - 1/> <#assign viewIndexNext = viewIndex + 1/> Modified: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl?rev=1624876&r1=1624875&r2=1624876&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl (original) +++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl Sun Sep 14 17:22:18 2014 @@ -23,7 +23,7 @@ under the License. <#assign returnPolicyDetails = eBayDetails.getReturnPolicyDetails()> </#if> <#if !returnPolicyEnabled??><#assign not = "not"></#if> -<#assign title = "Return policy is "+not!+" enabled for this category."> +<#assign title = "Return policy is "+(not!)+" enabled for this category."> <form name="APIForm" id="APIForm" method="post" action="ReturnPolicyServlet" > <table align="center" border="0"> @@ -151,4 +151,4 @@ under the License. </td> </tr> </table> -</form> \ No newline at end of file +</form> Modified: ofbiz/trunk/themes/bluelight/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/includes/header.ftl?rev=1624876&r1=1624875&r2=1624876&view=diff ============================================================================== --- ofbiz/trunk/themes/bluelight/includes/header.ftl (original) +++ ofbiz/trunk/themes/bluelight/includes/header.ftl Sun Sep 14 17:22:18 2014 @@ -96,7 +96,7 @@ under the License. <#assign organizationLogoLinkURL = "${layoutSettings.organizationLogoLinkUrl!}"> <#if person?has_content> - <#assign userName = person.firstName! + " " + person.middleName! + " " + person.lastName!> + <#assign userName = (person.firstName!) + " " + (person.middleName!) + " " + person.lastName!> <#elseif partyGroup?has_content> <#assign userName = partyGroup.groupName!> <#elseif userLogin??> Modified: ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl?rev=1624876&r1=1624875&r2=1624876&view=diff ============================================================================== --- ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl (original) +++ ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl Sun Sep 14 17:22:18 2014 @@ -96,7 +96,7 @@ under the License. <#assign organizationLogoLinkURL = "${layoutSettings.organizationLogoLinkUrl!}"> <#if person?has_content> - <#assign userName = person.firstName! + " " + person.middleName! + " " + person.lastName!> + <#assign userName = (person.firstName!) + " " + (person.middleName!) + " " + person.lastName!> <#elseif partyGroup?has_content> <#assign userName = partyGroup.groupName!> <#elseif userLogin??> Modified: ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl?rev=1624876&r1=1624875&r2=1624876&view=diff ============================================================================== --- ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl (original) +++ ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl Sun Sep 14 17:22:18 2014 @@ -18,7 +18,7 @@ under the License. --> <#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,delegator,dispatcher)> <#if person?has_content> - <#assign userName = person.firstName! + " " + person.middleName! + " " + person.lastName!> + <#assign userName = (person.firstName!) + " " + (person.middleName!) + " " + person.lastName!> <#elseif partyGroup?has_content> <#assign userName = partyGroup.groupName!> <#elseif userLogin??> |
Free forum by Nabble | Edit this page |