Search UI is more coherent :
[platal.git] / templates / search / index.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2006 Polytechnique.org                             *}
4 {*  http://opensource.polytechnique.org/                                  *}
5 {*                                                                        *}
6 {*  This program is free software; you can redistribute it and/or modify  *}
7 {*  it under the terms of the GNU General Public License as published by  *}
8 {*  the Free Software Foundation; either version 2 of the License, or     *}
9 {*  (at your option) any later version.                                   *}
10 {*                                                                        *}
11 {*  This program is distributed in the hope that it will be useful,       *}
12 {*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
13 {*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
14 {*  GNU General Public License for more details.                          *}
15 {*                                                                        *}
16 {*  You should have received a copy of the GNU General Public License     *}
17 {*  along with this program; if not, write to the Free Software           *}
18 {*  Foundation, Inc.,                                                     *}
19 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
20 {*                                                                        *}
21 {**************************************************************************}
22
23
24 {if $formulaire==0 and !$xorg_errors|count}
25   {if !$simple}
26     {if !$advanced}
27     {include file=search/quick.form.tpl show_js=1}
28     {else}
29     {include file=search/adv.links.tpl do_title=1 with_soundex=$with_soundex}
30     {/if}
31   {/if}
32
33   <h1 class='right'>
34     {if $search_results_nb==0}Aucune{else}{$search_results_nb}{/if} réponse{if $search_results_nb>1}s{/if}
35     {if $search_results_nb and $advanced and !$simple}
36     &nbsp;(<a href='geoloc/?{$search_vars}'>Voir sur une carte</a>)
37     {/if}
38   </h1>
39   
40   {if $search_results_nb > 1}
41   <div>
42     Trier par :
43     {foreach from=$search_order_link item=tri}
44     [<a href='{$tri.url}'>
45     {if $tri.asc or $tri.desc}<strong>{/if}
46     {$tri.text}
47     {if $tri.desc}<img src='images/up.png' alt='tri ascendant' />{/if}
48     {if  $tri.asc}<img src='images/dn.png' alt='tri descendant' />{/if}
49     {if $tri.asc or $tri.desc}</strong>{/if}
50     </a>]
51     {/foreach}
52   </div>
53   {/if}
54
55   {if $search_results_nb}
56   <div class="contact-list" style="clear:both">
57     {capture name=list}
58     {iterate item=res from=$search_results}
59       {if $res.contact || $res.watch}
60         {include file=include/minifiche.tpl c=$res show_action="retirer"}
61       {else}
62         {include file=include/minifiche.tpl c=$res show_action="ajouter"}
63       {/if}
64     {/iterate}
65     {/capture}
66     {$smarty.capture.list|smarty:nodefaults}
67   </div>
68
69   {if $search_pages_nb > 1}
70   <p>
71     {foreach from=$search_pages_link item=l}
72     {if $l.i eq $search_page}
73     <span class="erreur">{$l.text}</span>
74     {else}
75     <a href="{$l.u}">{$l.text}</a>
76     {/if}
77     {/foreach}
78   </p>
79   {/if}
80   {/if}
81
82   {if $smarty.session.auth ge AUTH_COOKIE}
83   <br />
84   {if $smarty.capture.list|smarty:nodefaults|display_lines > 20}
85   {if $advanced}
86   {include file=search/adv.links.tpl do_title=1}
87   {else}
88   {include file=search/quick.form.tpl}
89   {/if}
90   {/if}
91   
92   <p>
93   <strong>Astuce:</strong>
94   Si tu survoles une fiche, tu sauras quand elle a été mise à jour la dernière fois !</p>
95   {/if}
96 {else}
97   {if $advanced}
98   {include file=search/adv.form.tpl}
99   {else}
100   {include file=search/quick.tpl}
101   {/if}
102 {/if}
103
104
105 {* vim:set et sw=2 sts=2 sws=2: *}