Search UI is more coherent :
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 10 Aug 2006 23:27:51 +0000 (23:27 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 10 Aug 2006 23:27:51 +0000 (23:27 +0000)
* advanced and quick search have the same look
* no [link] lost alone on a line

&& fix advanced search

git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@800 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/search.php
templates/search/adv.form.tpl
templates/search/adv.links.tpl
templates/search/index.tpl
templates/search/quick.form.tpl

index eb7c9f1..0db2640 100644 (file)
@@ -145,6 +145,7 @@ class SearchModule extends PLModule
                                                    AND w.uid='.S::v('uid').')
                 '.$globals->search->result_where_statement."
                     $where
+                 GROUP BY  u.user_id
                  ORDER BY  ".($order?($order.', '):'')
                 .implode(',',array_filter(array($fields->get_order_statement(),
                                                 'promo DESC, NomSortKey, prenom'))).'
index 2ac5780..f35bf4e 100644 (file)
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>Recherche avancée</h1>
-
-<p>[<a href="search">Recherche simple</a>]</p>
+<h1>Recherche dans l'annuaire</h1>
 
 <form id="recherche" action="search/adv" method="get">
+  <script type="text/javascript">{literal}
+    function launch_form(url) {
+      var f = document.getElementById('recherche');
+      f.action = url;
+      f.submit();
+    }
+  {/literal}</script>
   <table class="bicol" cellpadding="3" summary="Recherche">
     <tr>
+      <th colspan="2">
+        Recherche avancée [<a href="search">&lt;&lt;&lt;&nbsp;Recherche simple</a>]
+      </th>
+    </tr>
+    <tr>
       <td>Nom</td>
       <td>
        <input type="hidden" name="rechercher" value="Chercher"/>
       <td>Commentaire contient</td>
       <td><input type="text" name="free" size="32" value="{$smarty.request.free}" /></td>
     </tr>
+    <tr>
+      <td colspan="2" style="padding-top: 1.5em">
+        <div style="float: right">
+          <input type="button" value="Chercher" onclick="launch_form('search/adv')"/>
+        </div>
+        {if $smarty.session.auth ge AUTH_COOKIE}
+          <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} />
+          mettre les fiches modifiées récemment en premier
+        {/if}
+      </td>
+    </tr>
   </table>
-  {if $smarty.session.auth ge AUTH_COOKIE}
-  <p>
-    <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} />
-    mettre les fiches modifiées récemment en premier
-  </p>
-  {/if}
 </form>
 <p class="center">
-  <script type="text/javascript">{literal}
-    function launch_form(url) {
-      var f = document.getElementById('recherche');
-      f.action = url;
-      f.submit();
-    }
-  {/literal}</script>
   <input type="button" value="Voir les résultats sur une carte" onclick="launch_form('geoloc/')"/>
-  <input type="button" value="Chercher" onclick="launch_form('search/adv')"/>
 </p>
 <p>
   <strong>N.B.</strong> Le caractère joker * peut remplacer une ou plusieurs lettres dans les recherches.
index c8bc4a8..3f6a69b 100644 (file)
@@ -20,7 +20,7 @@
 {*                                                                        *}
 {**************************************************************************}
 
-{if $do_title}<h1>Recherche avancée</h1>{/if}
+{if $do_title}<h1>Recherche dans l'annuaire</h1>{/if}
 
 <ul>
   {if $with_soundex && ($smarty.request.firstname || $smarty.request.name)}
index 1404886..c6a0c20 100644 (file)
   {/if}
 
   <h1 class='right'>
-    {if $search_results_nb==0}Aucune{else}{$search_results_nb}{/if} réponse{if $search_results_nb>1}s{/if}.
+    {if $search_results_nb==0}Aucune{else}{$search_results_nb}{/if} réponse{if $search_results_nb>1}s{/if}
+    {if $search_results_nb and $advanced and !$simple}
+    &nbsp;(<a href='geoloc/?{$search_vars}'>Voir sur une carte</a>)
+    {/if}
   </h1>
-
-  {if $search_results_nb and $advanced and !$simple}
-  <p>
-    [<a href='geoloc/?{$search_vars}'>Voir la recherche sur une carte</a>].
-  </p>
-  {/if}
   
   {if $search_results_nb > 1}
   <div>
index dc95c51..13046a8 100644 (file)
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>Recherche simple dans l'annuaire</h1>
+<h1>Recherche dans l'annuaire</h1>
 
 <form action="search" method="get"{if $show_js} id="quick_form"{/if}>
   <table class="bicol" cellspacing="0" cellpadding="4">
+    {if $smarty.session.auth ge AUTH_COOKIE}
+    <tr>
+      <th colspan="2">
+        Recherche simple [<a href="search/adv">&gt;&gt;&gt;&nbsp;Recherche&nbsp;avancée</a>]
+      </th>
+    </tr>
+    <tr>
+      <td colspan="2">
+        <input type='text' name="quick" value="{$smarty.request.quick}" style="width: 98%" /><br />
+      </td>
+    </tr>
     <tr>
       <td style="width: 78%">
-        <input type='text' name="quick" value="{$smarty.request.quick}" style="width: 100%" /><br />
-        {if $smarty.session.auth ge AUTH_COOKIE}
         <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} />
         mettre les fiches modifiées récemment en premier
         {if $smarty.request.nonins}
         <br /><input type='checkbox' name='nonins' readonly="readonly" checked='checked' value='1' /> Chercher uniquement des non inscrits
         {/if}
-        {/if}
       </td>
-      <td>
+    {else}
+    <tr>
+      <td style="width: 78%">
+        <input type='text' name="quick" value="{$smarty.request.quick}" style="width: 98%" /><br />
+      </td>
+    {/if}
+      <td class="right">
         <input type="submit" value="Chercher" />
-        {if $smarty.session.auth ge AUTH_COOKIE}
-        <br /><a class='smaller' href="search/adv">Recherche&nbsp;avancée</a>
-        {/if}
       </td>
     </tr>
   </table>