Hide pagination if there is only 1 page
This commit is contained in:
@@ -19,7 +19,8 @@
|
||||
{$product_order={$smarty.get.order|default:'alpha'}}
|
||||
<article class="col-main {$smarty.get.mode|default:"grid"}" role="main">
|
||||
{ifloop rel="product_list"}
|
||||
{include file="includes/toolbar.html" toolbar="top" limit=$limit order=$product_order amount={count type="product" category={category attr="id"}}}
|
||||
{assign var="amount" value="{count type="product" category={category attr="id"}}"}
|
||||
{include file="includes/toolbar.html" toolbar="top" limit=$limit order=$product_order amount={$amount}}
|
||||
<div id="category-products">
|
||||
<div class="products-content">
|
||||
<ul class="product-col-4">
|
||||
@@ -29,7 +30,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#category-products -->
|
||||
{include file="includes/toolbar.html" toolbar="bottom"}
|
||||
{include file="includes/toolbar.html" toolbar="bottom" amount={$amount}}
|
||||
{/ifloop}
|
||||
{elseloop rel="product_list"}
|
||||
<div class="address-warning">
|
||||
|
||||
@@ -37,31 +37,33 @@
|
||||
|
||||
</div><!-- /.sorter -->
|
||||
{else}
|
||||
<div class="pagination-container" role="pagination" aria-labelledby="pagination-label-{$toolbar}}">
|
||||
<strong id="pagination-label-{$toolbar}}" class="pagination-label">{intl l="Pagination"}</strong>
|
||||
<ul class="pagination">
|
||||
{if $amount > $limit}
|
||||
<div class="pagination-container" role="pagination" aria-labelledby="pagination-label-{$toolbar}}">
|
||||
<strong id="pagination-label-{$toolbar}}" class="pagination-label">{intl l="Pagination"}</strong>
|
||||
<ul class="pagination">
|
||||
|
||||
{if $product_page > 1}
|
||||
<li><a href="{url path={navigate to="current"} page={$product_page-1} }" title="{intl l="Previous"}" class="prev"><i class="icon-prev"></i></a></li>
|
||||
{else}
|
||||
<li><a href="#" title="{intl l="Previous"}" class="prev"><i class="icon-prev"></i></a></li>
|
||||
{/if}
|
||||
{pageloop rel="product_list"}
|
||||
{if $PAGE != $CURRENT}
|
||||
<li><a href="{url path={navigate to="current"} page=$PAGE }"> {$PAGE} </a></li>
|
||||
{else}
|
||||
<li class="active"><a href="#" tabindex="-1">{$PAGE}</a></li>
|
||||
{/if}
|
||||
{if $PAGE == $LAST}
|
||||
{if $CURRENT < $LAST}
|
||||
<li><a href="{url path={navigate to="current"} page={$CURRENT+1} }" title="{intl l="Next"}" class="next"><i class="icon-next"></i></a></li>
|
||||
{if $product_page > 1}
|
||||
<li><a href="{url path={navigate to="current"} page={$product_page-1} }" title="{intl l="Previous"}" class="prev"><i class="icon-prev"></i></a></li>
|
||||
{else}
|
||||
<li><a href="#" title="{intl l="Next"}" class="next"><i class="icon-next"></i></a></li>
|
||||
<li><a href="#" title="{intl l="Previous"}" class="prev"><i class="icon-prev"></i></a></li>
|
||||
{/if}
|
||||
{pageloop rel="product_list"}
|
||||
{if $PAGE != $CURRENT}
|
||||
<li><a href="{url path={navigate to="current"} page=$PAGE }"> {$PAGE} </a></li>
|
||||
{else}
|
||||
<li class="active"><a href="#" tabindex="-1">{$PAGE}</a></li>
|
||||
{/if}
|
||||
{if $PAGE == $LAST}
|
||||
{if $CURRENT < $LAST}
|
||||
<li><a href="{url path={navigate to="current"} page={$CURRENT+1} }" title="{intl l="Next"}" class="next"><i class="icon-next"></i></a></li>
|
||||
{else}
|
||||
<li><a href="#" title="{intl l="Next"}" class="next"><i class="icon-next"></i></a></li>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
{/pageloop}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
{/pageloop}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div><!-- /.toolbar toolbar-<?php echo $toolbar; ?> -->
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
<article class="col-main {$smarty.get.mode|default:"grid"}" role="main" aria-labelledby="main-label">
|
||||
|
||||
<h1 id="main-label" class="page-header">{intl l="Search Result for"} <small>{$smarty.get.q}</small></h1>
|
||||
{include file="includes/toolbar.html" toolbar="top" limit=$limit order=$product_order amount={count type="product" title="{$smarty.get.q}"}}
|
||||
{assign var="amount" value="{count type="product" title="{$smarty.get.q}"}"}
|
||||
{include file="includes/toolbar.html" toolbar="top" limit=$limit order=$product_order amount={$amount}}
|
||||
<div id="category-products">
|
||||
<div class="products-content">
|
||||
{ifloop rel="product_list"}
|
||||
@@ -36,7 +37,7 @@
|
||||
</div>
|
||||
</div><!-- /#category-products -->
|
||||
{ifloop rel="product_list"}
|
||||
{include file="includes/toolbar.html" toolbar="bottom"}
|
||||
{include file="includes/toolbar.html" toolbar="bottom" amount={$amount}}
|
||||
{/ifloop}
|
||||
</article>
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<article class="col-main {$smarty.get.mode|default:"grid"}" role="main" aria-labelledby="main-label">
|
||||
|
||||
<h1 id="main-label" class="page-header">{if $product_type == "new"}{intl l="Latest products"}{elseif $product_type == "offers"}{intl l="Product Offers"}{/if}</h1>
|
||||
|
||||
{include file="includes/toolbar.html" toolbar="top" limit=$limit order=$product_order amount={count type="product" promo="{$product_type == "offers"}" new="{$product_type == "new"}"}}
|
||||
{assign var="amount" value="{count type="product" promo="{$product_type == "offers"}" new="{$product_type == "new"}"}"}
|
||||
{include file="includes/toolbar.html" toolbar="top" limit=$limit order=$product_order amount={$amount}}
|
||||
<div id="category-products">
|
||||
<div class="products-content">
|
||||
{ifloop rel="product_list"}
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
</div><!-- /#category-products -->
|
||||
{ifloop rel="product_list"}
|
||||
{include file="includes/toolbar.html" toolbar="bottom"}
|
||||
{include file="includes/toolbar.html" toolbar="bottom" amount={$amount}}
|
||||
{/ifloop}
|
||||
</article>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user