Template default : fixed bad way to browse a range in smarty language

This commit is contained in:
Benjamin Renard 2012-09-02 20:08:41 +02:00
parent a50c080de2
commit 1477f1378b
2 changed files with 2 additions and 4 deletions

View file

@ -43,7 +43,6 @@
{if $page.nbPages > 1}
<p class='LSobject-list-page'>
{if $page.nbPages > 10}
{php}$this->assign('range', range(0,10));{/php}
{if $page.nb > 5}
{if $page.nb > $page.nbPages-6}
{assign var=start value=$page.nbPages-12}
@ -54,7 +53,7 @@
{assign var=start value=0}
{/if}
<a href='select.php?LSobject={$LSsearch->LSobject}&amp;page=0&amp;multiple={$searchForm.multiple}' class='LSobject-list-page'><</a>
{foreach from=$range item=i}
{foreach from=0|range:10 item=i}
{if $page.nb==$start+$i}
<strong class='LSobject-list-page'>{$page.nb+1}</strong>
{else}

View file

@ -93,7 +93,6 @@
<p class='LSobject-list-page'>
{if $page.nbPages > 10}
{php}$this->assign('range', range(0,10));{/php}
{if $page.nb > 5}
{if $page.nb > $page.nbPages-6}
{assign var=start value=$page.nbPages-12}
@ -104,7 +103,7 @@
{assign var=start value=0}
{/if}
<a href='view.php?LSobject={$LSsearch->LSobject}&amp;page=0' class='LSobject-list-page'><</a>
{foreach from=$range item=i}
{foreach from=0|range:10 item=i}
{if $page.nb==$start+$i}
<strong class='LSobject-list-page'>{$page.nb+1}</strong>
{else}