Fixes vim mode line.
[platal.git] / templates / plview.multipage.tpl
index edd3313..5c8af74 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2011 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
   {if $show_bounds}<div style="float: right"><small><strong>[{$first} - {$last}]&nbsp;</strong></small></div>{/if}
 <div class="center pages" style="float: left">
   {if $plview->page neq 1}
-  <a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page=1#pl_set_top">{icon name=resultset_first title="Première page"}</a>{*
-  *}<a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page={$plview->page-1}#pl_set_top">{icon name=resultset_previous title="Page précédente"}</a>
+  <a href="{$platal->pl_self()}{$plset_args}order={$order}&amp;restrict={$restrict}&amp;page=1#pl_set_top">{icon name=resultset_first title="Première page"}</a>{*
+  *}<a href="{$platal->pl_self()}{$plset_args}order={$order}&amp;restrict={$restrict}&amp;page={$plview->page-1}#pl_set_top">{icon name=resultset_previous title="Page précédente"}</a>
   {else}
   {icon name=null title=""}{icon name=null title=""}
   {/if}
   {section name=page loop=$plview->pages+1 start=1}
   {if $smarty.section.page.index eq $plview->page}
-  <span style="color: red">{$plview->page}</span> 
+  <span style="color: red">{$plview->page}</span>
   {else}
-  <a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page={$smarty.section.page.index}#pl_set_top">{$smarty.section.page.index}</a>
+  <a href="{$platal->pl_self()}{$plset_args}order={$order}&amp;restrict={$restrict}&amp;page={$smarty.section.page.index}#pl_set_top">{$smarty.section.page.index}</a>
   {/if}
   {/section}
   {if $plview->page neq $plview->pages}
-  <a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page={$plview->page+1}#pl_set_top">{icon name=resultset_next title="Page suivante"}</a>{*
-  *}<a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page={$plview->pages}#pl_set_top">{icon name=resultset_last title="Dernière page"}</a>
+  <a href="{$platal->pl_self()}{$plset_args}order={$order}&amp;restrict={$restrict}&amp;page={$plview->page+1}#pl_set_top">{icon name=resultset_next title="Page suivante"}</a>{*
+  *}<a href="{$platal->pl_self()}{$plset_args}order={$order}&amp;restrict={$restrict}&amp;page={$plview->pages}#pl_set_top">{icon name=resultset_last title="Dernière page"}</a>
   {else}
   {icon name=null title=""}{icon name=null title=""}
   {/if}
   [
   {if $name eq $order}
   <img src='images/dn.png' alt='tri ascendant' />
-  <a href="{$platal->pl_self()}{$plset_search}order=-{$name}#pl_set_top">{$sort.desc}</a>
+  <a href="{$platal->pl_self()}{$plset_args}order=-{$name}#pl_set_top">{$sort->displaytext}</a>
   {elseif $order eq "-$name"}
   <img src='images/up.png' alt='tri ascendant' />
-  <a href="{$platal->pl_self()}{$plset_search}order={$name}#pl_set_top">{$sort.desc}</a>
+  <a href="{$platal->pl_self()}{$plset_args}order={$name}#pl_set_top">{$sort->displaytext}</a>
   {else}
-  <a href="{$platal->pl_self()}{$plset_search}order={$name}#pl_set_top">{$sort.desc}</a>
+  <a href="{$platal->pl_self()}{$plset_args}order={$name}#pl_set_top">{$sort->displaytext}</a>
   {/if}
   ]&nbsp;
   {/foreach}
 {/if}
 {/capture}
 
+{capture name=groups}
+{if $plset_has_groups}
+<div style="clear: both">
+  Restreindre à&nbsp;: [
+  {foreach from=$plset_groups key=group item=amount name=groups}
+  {if $amount > 0}
+    {if $group eq $restrict}
+    <em title="{$amount} résultats">{$group}</em>
+    {else}
+    <a href="{$platal->pl_self()}{$plset_args}order={$order}&restrict={$group}#pl_set_top" title="{$amount} résultats">{$group}</a>
+    {/if}
+    {if !$smarty.foreach.groups.last}
+    &nbsp;
+    {/if}
+  {/if}
+  {/foreach}
+  ]
+</div>
+{/if}
+{/capture}
 
 {$smarty.capture.order|smarty:nodefaults}
 
+{$smarty.capture.groups|smarty:nodefaults}
+
 {$smarty.capture.pages|smarty:nodefaults}
 
 <div id="multipage_content" style="padding: 0.5em 0; clear: both">
 
 {$smarty.capture.order|smarty:nodefaults}
 
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
+{* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}