From 34a2fd7f5b84c377f3d524a30a46a191d99c6c63 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Tue, 12 Oct 2004 19:54:35 +0000 Subject: [PATCH] closes #89 --- htdocs/css/default.css | 7 +------ htdocs/search.php | 7 ++++--- templates/include/x_inscrit.tpl | 5 ++--- templates/search.form.tpl | 11 ++++++++--- templates/search.result.private.tpl | 3 +-- templates/search.result.public.tpl | 6 ++---- templates/search.tpl | 35 ++++++++++++++++++++++------------- 7 files changed, 40 insertions(+), 34 deletions(-) diff --git a/htdocs/css/default.css b/htdocs/css/default.css index 57c82b7..aaa9439 100644 --- a/htdocs/css/default.css +++ b/htdocs/css/default.css @@ -228,11 +228,6 @@ div.contact div.bits { float: left; } -div.bits .smaller { display: none; } -/* -div.contact:hover div.bits .smaller { display: inline; } -*/ - div.contact div.long { width: 100%; clear: both; @@ -582,4 +577,4 @@ div.spacer { clear: both; } } /* vim: set et ts=4 sts=4 sw=4: */ -/* $Id: default.css,v 1.47 2004-10-09 14:04:47 x2000habouzit Exp $ */ +/* $Id: default.css,v 1.48 2004-10-12 19:54:36 x2000habouzit Exp $ */ diff --git a/htdocs/search.php b/htdocs/search.php index 23ccb6c..308a593 100644 --- a/htdocs/search.php +++ b/htdocs/search.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.php,v 1.21 2004-10-12 18:18:19 x2000habouzit Exp $ + $Id: search.php,v 1.22 2004-10-12 19:54:35 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -59,7 +59,7 @@ if (array_key_exists('rechercher', $_REQUEST)) { new ThrowError('Recherche trop générale.'); } $offset = new NumericSField('offset'); - + $sql = 'SELECT SQL_CALC_FOUND_ROWS r.matricule,i.matricule_ax, u.nom!="" AS inscrit, @@ -92,7 +92,8 @@ if (array_key_exists('rechercher', $_REQUEST)) { LEFT JOIN geoloc_pays AS gp ON (adr.pays = gp.a2) LEFT JOIN geoloc_region AS gr ON (adr.pays = gr.a2 AND adr.region = gr.region) WHERE '.$fields->get_where_statement().' - ORDER BY '.implode(',',array_filter(array($fields->get_order_statement(),'promo DESC,nom,prenom'))).' + ORDER BY '.(logged() && !empty($_POST['mod_date_sort']) ? 'date DESC,' :'') + .implode(',',array_filter(array($fields->get_order_statement(),'promo DESC,nom,prenom'))).' LIMIT '.$offset->value.','.$globals->search_results_per_page; $page->mysql_assign($sql, 'resultats', 'nb_resultats','nb_resultats_total'); diff --git a/templates/include/x_inscrit.tpl b/templates/include/x_inscrit.tpl index d931142..8a6b1c5 100644 --- a/templates/include/x_inscrit.tpl +++ b/templates/include/x_inscrit.tpl @@ -17,11 +17,11 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: x_inscrit.tpl,v 1.12 2004-10-12 18:20:22 x2000habouzit Exp $ + $Id: x_inscrit.tpl,v 1.13 2004-10-12 19:54:36 x2000habouzit Exp $ ***************************************************************************} -
+
{if $c.epouse}{$c.epouse} {$c.prenom}
({$c.nom} {$c.prenom}){else}{$c.nom} {$c.prenom}{/if} {if $c.dcd}(décédé){/if} @@ -50,7 +50,6 @@ {perms level='admin'} AX {/perms} - {$c.date|date_format:"%d-%m-%Y"}
diff --git a/templates/search.form.tpl b/templates/search.form.tpl index c27c490..ddab74c 100644 --- a/templates/search.form.tpl +++ b/templates/search.form.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.form.tpl,v 1.17 2004-10-12 06:07:28 x2000bedo Exp $ + $Id: search.form.tpl,v 1.18 2004-10-12 19:54:36 x2000habouzit Exp $ ***************************************************************************}
@@ -245,9 +245,14 @@ {/if}
-

+

+
+ {min_auth level='cookie'} + + mettre les fiches modifiées récement en premier
+ {/min_auth} -

+

N.B. Le caractère joker * peut remplacer une ou plusieurs lettres dans les recherches. diff --git a/templates/search.result.private.tpl b/templates/search.result.private.tpl index bbdd49e..5df1d78 100644 --- a/templates/search.result.private.tpl +++ b/templates/search.result.private.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.result.private.tpl,v 1.13 2004-10-12 18:20:22 x2000habouzit Exp $ + $Id: search.result.private.tpl,v 1.14 2004-10-12 19:54:36 x2000habouzit Exp $ ***************************************************************************}

@@ -37,7 +37,6 @@ AX {/perms} - {$result.date|date_format:"%d-%m-%Y"}
{if $result.inscrit!=1} {if $result.decede != 1} diff --git a/templates/search.result.public.tpl b/templates/search.result.public.tpl index ac21fab..84566f6 100644 --- a/templates/search.result.public.tpl +++ b/templates/search.result.public.tpl @@ -17,14 +17,12 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.result.public.tpl,v 1.5 2004-10-12 17:31:38 x2000habouzit Exp $ + $Id: search.result.public.tpl,v 1.6 2004-10-12 19:54:36 x2000habouzit Exp $ ***************************************************************************}
{if $result.epouse}{$result.epouse} {$result.prenom}
({$result.nom} {$result.prenom}){else}{$result.nom} {$result.prenom}{/if} - {if $result.decede == 1} - (décédé) - {/if} + {if $result.decede == 1}(décédé){/if}
{strip} diff --git a/templates/search.tpl b/templates/search.tpl index 4f5b1a4..b59ec8c 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -17,14 +17,22 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.tpl,v 1.13 2004-10-09 18:18:58 x2000habouzit Exp $ + $Id: search.tpl,v 1.14 2004-10-12 19:54:36 x2000habouzit Exp $ ***************************************************************************} {dynamic} -{if $nb_resultats_total >= 600}{assign var='error' value="Recherche trop générale."}{/if} +{if $nb_resultats_total >= 800}{assign var='error' value="Recherche trop générale."}{/if} {if $formulaire==0 and !$error} + {min_auth level='cookie'} +
+ Astuce +
+

+ Si tu survoles une fiche, tu sauras quand elle a été mise à jour la dernière fois ! +

+ {/min_auth}
Résultats
@@ -35,23 +43,24 @@ {if $with_soundex==0} - - Recherche par proximité sonore  + [ + Recherche par proximité sonore]  {/if} - Nouvelle recherche + [Nouvelle recherche]
{section name=resultat loop=$resultats} -
-
- {include file="search.result.public.tpl" result=$resultats[resultat]} - {min_auth level="cookie"} - {include file="search.result.private.tpl" result=$resultats[resultat]} - {/min_auth} -
-
+
+
+ {include file="search.result.public.tpl" result=$resultats[resultat]} + {min_auth level="cookie"} + {include file="search.result.private.tpl" result=$resultats[resultat]} + {/min_auth} +
+
{/section}
-- 2.1.4