Author: jleroux
Date: Sun Sep 6 19:04:43 2009
New Revision: 811860
URL:
http://svn.apache.org/viewvc?rev=811860&view=revLog:
A suggested fix by Ruth Hoffman at "categorydetail.ftl page select drop-down and pagination is not compatible with new screen called categorydetailmatrix.ftl. [Screen uses 3 columns per row to display products vs 1 column per row from older versions.]" (
https://issues.apache.org/jira/browse/OFBIZ-2596) - OFBIZ-2596
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.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=811860&r1=811859&r2=811860&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 6 19:04:43 2009
@@ -19,7 +19,11 @@
<#macro paginationControls>
<#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize - 1)?double / viewSize?double)>
- <#if (viewIndexMax?int > 1)>
+ <#-- if the list size/view size (that is total number of items allowed on the page for this page)
+ is 0 or 1 then there is only 1 page of items - so display the pagination drop down anyhow
+ 'cause its cool and people should see it.
+ -->
+ <#if (viewIndexMax?int > -1)>
<div class="product-prevnext">
<#-- Start Page Select Drop-Down -->
<select name="pageSelect" onchange="window.location=this[this.selectedIndex].value;">
@@ -32,7 +36,7 @@
<#if (viewIndex?int > 1)>
<a href="<@ofbizUrl>category/~category_id=${productCategoryId}/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex?int - 1}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> |
</#if>
- <#if (listSize?int > 0)>
+ <#if ((listSize?int - viewSize?int) > 0)>
<span>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${listSize}</span>
</#if>
<#if highIndex?int < listSize?int>