svn commit: r1792018 - in /ofbiz/ofbiz-framework/trunk: applications/order/template/entry/catalog/CategoryDetail.ftl applications/party/template/party/EditShoppingList.ftl framework/common/template/includes/HtmlTemplate.ftl

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

svn commit: r1792018 - in /ofbiz/ofbiz-framework/trunk: applications/order/template/entry/catalog/CategoryDetail.ftl applications/party/template/party/EditShoppingList.ftl framework/common/template/includes/HtmlTemplate.ftl

jacopoc
Author: jacopoc
Date: Thu Apr 20 06:38:20 2017
New Revision: 1792018

URL: http://svn.apache.org/viewvc?rev=1792018&view=rev
Log:
Fixed: removed explicit includes of HtmlTemplate.ftl from FreeMarker templates
since this has been deprecated and it is no more supported.
(OFBIZ-9325)

Improved the nextPrev macro by moving some logic from the template to the macro.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/template/entry/catalog/CategoryDetail.ftl
    ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl
    ofbiz/ofbiz-framework/trunk/framework/common/template/includes/HtmlTemplate.ftl

Modified: ofbiz/ofbiz-framework/trunk/applications/order/template/entry/catalog/CategoryDetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/template/entry/catalog/CategoryDetail.ftl?rev=1792018&r1=1792017&r2=1792018&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/template/entry/catalog/CategoryDetail.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/template/entry/catalog/CategoryDetail.ftl Thu Apr 20 06:38:20 2017
@@ -119,16 +119,10 @@ under the License.
     <#if paginateEcommerceStyle??>
         <@paginationControls/>
     <#else>
-        <#include "component://common/template/includes/HtmlTemplate.ftl"/>
         <#assign commonUrl = "category?category_id="+ (parameters.category_id!) + "&"/>
-        <#--assign viewIndex = viewIndex - 1/-->
-        <#assign viewIndexFirst = 0/>
-        <#assign viewIndexPrevious = viewIndex - 1/>
-        <#assign viewIndexNext = viewIndex + 1/>
-        <#assign viewIndexLast = Static["org.apache.ofbiz.base.util.UtilMisc"].getViewLastIndex(listSize, viewSize) />
         <#assign messageMap = Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("lowCount", lowIndex, "highCount", highIndex, "total", listSize)/>
         <#assign commonDisplaying = Static["org.apache.ofbiz.base.util.UtilProperties"].getMessage("CommonUiLabels", "CommonDisplaying", messageMap, locale)/>
-        <@nextPrev commonUrl=commonUrl ajaxEnabled=false javaScriptEnabled=false paginateStyle="nav-pager" paginateFirstStyle="nav-first" viewIndex=viewIndex highIndex=highIndex listSize=listSize viewSize=viewSize ajaxFirstUrl="" firstUrl="" paginateFirstLabel="" paginatePreviousStyle="nav-previous" ajaxPreviousUrl="" previousUrl="" paginatePreviousLabel="" pageLabel="" ajaxSelectUrl="" selectUrl="" ajaxSelectSizeUrl="" selectSizeUrl="" commonDisplaying=commonDisplaying paginateNextStyle="nav-next" ajaxNextUrl="" nextUrl="" paginateNextLabel="" paginateLastStyle="nav-last" ajaxLastUrl="" lastUrl="" paginateLastLabel="" paginateViewSizeLabel="" />
+        <@htmlTemplate.nextPrev commonUrl=commonUrl ajaxEnabled=false javaScriptEnabled=false paginateStyle="nav-pager" paginateFirstStyle="nav-first" viewIndex=viewIndex highIndex=highIndex listSize=listSize viewSize=viewSize ajaxFirstUrl="" firstUrl="" paginateFirstLabel="" paginatePreviousStyle="nav-previous" ajaxPreviousUrl="" previousUrl="" paginatePreviousLabel="" pageLabel="" ajaxSelectUrl="" selectUrl="" ajaxSelectSizeUrl="" selectSizeUrl="" commonDisplaying=commonDisplaying paginateNextStyle="nav-next" ajaxNextUrl="" nextUrl="" paginateNextLabel="" paginateLastStyle="nav-last" ajaxLastUrl="" lastUrl="" paginateLastLabel="" paginateViewSizeLabel="" />
     </#if>
       <#assign numCol = numCol?default(1)>
       <#assign numCol = numCol?number>

Modified: ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl?rev=1792018&r1=1792017&r2=1792018&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl Thu Apr 20 06:38:20 2017
@@ -176,15 +176,10 @@ under the License.
   <div class="screenlet-body">
     <#if shoppingListItemDatas?has_content>
         <#-- Pagination -->
-        <#include "component://common/template/includes/HtmlTemplate.ftl"/>
         <#assign commonUrl = "editShoppingList?partyId=" + partyId + "&shoppingListId="+(shoppingListId!)+"&"/>
-        <#assign viewIndexFirst = 0/>
-        <#assign viewIndexPrevious = viewIndex - 1/>
-        <#assign viewIndexNext = viewIndex + 1/>
-        <#assign viewIndexLast = Static["org.apache.ofbiz.base.util.UtilMisc"].getViewLastIndex(listSize, viewSize) />
         <#assign messageMap = Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("lowCount", lowIndex, "highCount", highIndex, "total", listSize)/>
         <#assign commonDisplaying = Static["org.apache.ofbiz.base.util.UtilProperties"].getMessage("CommonUiLabels", "CommonDisplaying", messageMap, locale)/>
-        <@nextPrev commonUrl=commonUrl ajaxEnabled=false javaScriptEnabled=false paginateStyle="nav-pager" paginateFirstStyle="nav-first" viewIndex=viewIndex highIndex=highIndex listSize=listSize viewSize=viewSize ajaxFirstUrl="" firstUrl="" paginateFirstLabel="" paginatePreviousStyle="nav-previous" ajaxPreviousUrl="" previousUrl="" paginatePreviousLabel="" pageLabel="" ajaxSelectUrl="" selectUrl="" ajaxSelectSizeUrl="" selectSizeUrl="" commonDisplaying=commonDisplaying paginateNextStyle="nav-next" ajaxNextUrl="" nextUrl="" paginateNextLabel="" paginateLastStyle="nav-last" ajaxLastUrl="" lastUrl="" paginateLastLabel="" paginateViewSizeLabel="" />
+        <@htmlTemplate.nextPrev commonUrl=commonUrl ajaxEnabled=false javaScriptEnabled=false paginateStyle="nav-pager" paginateFirstStyle="nav-first" viewIndex=viewIndex highIndex=highIndex listSize=listSize viewSize=viewSize ajaxFirstUrl="" firstUrl="" paginateFirstLabel="" paginatePreviousStyle="nav-previous" ajaxPreviousUrl="" previousUrl="" paginatePreviousLabel="" pageLabel="" ajaxSelectUrl="" selectUrl="" ajaxSelectSizeUrl="" selectSizeUrl="" commonDisplaying=commonDisplaying paginateNextStyle="nav-next" ajaxNextUrl="" nextUrl="" paginateNextLabel="" paginateLastStyle="nav-last" ajaxLastUrl="" lastUrl="" paginateLastLabel="" paginateViewSizeLabel="" />
       <table class="basic-table" cellspacing="0">
         <tr class="header-row">
           <td>${uiLabelMap.PartyProduct}</td>

Modified: ofbiz/ofbiz-framework/trunk/framework/common/template/includes/HtmlTemplate.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/template/includes/HtmlTemplate.ftl?rev=1792018&r1=1792017&r2=1792018&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/template/includes/HtmlTemplate.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/template/includes/HtmlTemplate.ftl Thu Apr 20 06:38:20 2017
@@ -39,6 +39,10 @@ under the License.
 </#macro>
 
 <#macro nextPrev commonUrl="" ajaxEnabled=false javaScriptEnabled=false paginateStyle="nav-pager" paginateFirstStyle="nav-first" viewIndex=0 highIndex=0 listSize=0 viewSize=1 ajaxFirstUrl="" firstUrl="" paginateFirstLabel="" paginatePreviousStyle="nav-previous" ajaxPreviousUrl="" previousUrl="" paginatePreviousLabel="" pageLabel="" ajaxSelectUrl="" selectUrl="" ajaxSelectSizeUrl="" selectSizeUrl="" commonDisplaying="" paginateNextStyle="nav-next" ajaxNextUrl="" nextUrl="" paginateNextLabel="" paginateLastStyle="nav-last" ajaxLastUrl="" lastUrl="" paginateLastLabel="" paginateViewSizeLabel="" >
+  <#assign viewIndexFirst = 0/>
+  <#assign viewIndexPrevious = viewIndex - 1/>
+  <#assign viewIndexNext = viewIndex + 1/>
+  <#assign viewIndexLast = Static["org.apache.ofbiz.base.util.UtilMisc"].getViewLastIndex(listSize, viewSize) />
   <#local javaScriptEnabled = javaScriptEnabled />
   <#if (!javaScriptEnabled)>
     <#local javaScriptEnabled = Static["org.apache.ofbiz.base.util.UtilHttp"].isJavaScriptEnabled(request) />