From e35882beae6b03f138e68d7bcf5e943bff1f4d52 Mon Sep 17 00:00:00 2001
From: Pascal Corpet
Date: Sun, 16 Sep 2007 00:09:22 +0200
Subject: [PATCH] Popup profile window when search has only one result
---
modules/search.php | 1 +
templates/search/index.tpl | 15 ++++++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/modules/search.php b/modules/search.php
index a4cd481..46c7850 100644
--- a/modules/search.php
+++ b/modules/search.php
@@ -129,6 +129,7 @@ class SearchModule extends PLModule
$view->apply('search', $page, $action, $subaction);
$nb_tot = $view->count();
+ $page->assign('search_results_nb', $nb_tot);
if ($subaction) {
return;
}
diff --git a/templates/search/index.tpl b/templates/search/index.tpl
index 7d4abb8..d44e692 100644
--- a/templates/search/index.tpl
+++ b/templates/search/index.tpl
@@ -44,13 +44,26 @@
{/if}
+ {if $search_results_nb eq 1}{literal}
+
+ {/literal}{/if}
+
{if $smarty.session.auth ge AUTH_COOKIE}
{icon name=lightbulb title=Astuce}Astuce :
{if $search_results_nb}
Si tu survoles une fiche, tu sauras quand elle a été mise à jour la dernière fois !
{elseif $advanced && $with_soundex && ($smarty.request.name || $smarty.request.firstname)}
- Si tu n'es pas sur de l'orthographe d'un nom, tu peux essayer la recherche par
+ Si tu n'es pas sûr de l'orthographe d'un nom, tu peux essayer la recherche par
proximité sonore
{elseif $advanced}
Essaye d'élargir tes critères de recherche.
--
2.1.4