Template default : fixed bad way to browse a range in smarty language
authorBenjamin Renard <bn8@zionetrix.net>
Sun, 2 Sep 2012 18:08:41 +0000 (20:08 +0200)
committerBenjamin Renard <bn8@zionetrix.net>
Sun, 2 Sep 2012 18:08:41 +0000 (20:08 +0200)
public_html/templates/default/select_table.tpl
public_html/templates/default/viewSearch.tpl

index 6458a08..b9f1842 100644 (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}
index 2652c6b..b8d7b9f 100644 (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}
       {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}