| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2004 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 !$exalead_data} |
| 25 | <p class="descr"> |
| 26 | Cette page de recherche fonctionne grâce au moteur développé par <a href="http://www.exalead.com/">Exalead</a>. |
| 27 | </p> |
| 28 | {/if} |
| 29 | |
| 30 | <p class="descr"> |
| 31 | Ce moteur est capable de dégager des catégories à partir des résultats qu'il a trouvé, tu peux alors |
| 32 | affiner ta recherche et éliminer les résultats d'une catégorie particulière |
| 33 | (<img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/>) |
| 34 | ou ne demander que les résultats appartenant à une catégorie particulière |
| 35 | (<img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]"/>). |
| 36 | </p> |
| 37 | |
| 38 | <p class="descr"> |
| 39 | Ce moteur sait aussi détecter des mots clés qu'il a pu rencontrer parmi les résultats, et permet |
| 40 | d'affiner la recherche sur ces critères, suivant le même fonctionnement que les catégories. |
| 41 | </p> |
| 42 | |
| 43 | <span><a href="http://www.exalead.com">Powered by <img src="images/Exalead-logo-Carved-100.gif" alt="Logo Exalead" /></a></span> |
| 44 | |
| 45 | {if $exalead_data && $exalead_data->hits} |
| 46 | <table class="exa_data"> |
| 47 | <tr> |
| 48 | <td class="exa_left"> |
| 49 | <form method="post" action="{$smarty.server.PHP_SELF}"> |
| 50 | <div class="exa_form"> |
| 51 | <div>Rechercher</div> |
| 52 | <div><input type="text" name="query" value="{$exalead_data->query->query}" size="30" /></div> |
| 53 | <div><input type="submit" name="chercher" value="Chercher" /></div> |
| 54 | </div> |
| 55 | </form> |
| 56 | {if $exalead_data} |
| 57 | |
| 58 | {if !$exalead_data->hits} |
| 59 | <p class="erreur">Il n'y a aucun résultat...</p> |
| 60 | {else} |
| 61 | <div id="nb_results"> |
| 62 | {if $exalead_data->estimated} |
| 63 | <div class="nb_results">Votre recherche a retourné <strong>environ {$exalead_data->nmatches}</strong> résultats.</div> |
| 64 | {else} |
| 65 | <div class="nb_results">Votre recherche a retourné <strong>{$exalead_data->nmatches}</strong> résultats.</div> |
| 66 | {/if} |
| 67 | </div> |
| 68 | {/if} |
| 69 | |
| 70 | {* |
| 71 | //Correction orthographique |
| 72 | {if $exalead_data->spellings|@count > 0} |
| 73 | <div class="exa_groupe"> |
| 74 | <div class="titre">Voulais-tu dire :</div> |
| 75 | {foreach from=$exalead_data->spellings item="spelling"} |
| 76 | <div class="exa_categorie"><a href="exalead.php?query={$spelling->query_href}">{$spelling->display}</a></div> |
| 77 | {/foreach} |
| 78 | </div> |
| 79 | {/if} |
| 80 | |
| 81 | //Categories |
| 82 | {if $exalead_data->groups|@count > 0} |
| 83 | {foreach from=$exalead_data->groups item="group"} |
| 84 | <div class="exa_groupe"> |
| 85 | <div class="titre">{$group->title} :</div> |
| 86 | {foreach from=$group->categories item="categorie"} |
| 87 | {if $categorie->reset_href} |
| 88 | {if $categorie->count == 0} |
| 89 | <div class="exa_categorie" style="background-color: {cycle values="inherit,inherit"}"><span style="text-decoration: line-through;"> |
| 90 | <a href="?_C={$exalead_data->query->context}/{$categorie->reset_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" /> {$categorie->display}</a></span> |
| 91 | </div> |
| 92 | {else} |
| 93 | <div class="exa_categorie" style="background-color: {cycle values="inherit,inherit"}"><strong>{$categorie->display}</strong> |
| 94 | <a href="?_C={$exalead_data->query->context}/{$categorie->reset_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a> |
| 95 | </div> |
| 96 | {/if} |
| 97 | {else} |
| 98 | <div class="exa_categorie" style="background-color: {cycle values="inherit,inherit"}"> |
| 99 | <a style="text-decoration: none;" href="?_C={$exalead_data->query->context}/{$categorie->refine_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" />{$categorie->display} ({$categorie->count})</a> |
| 100 | <a href="?_C={$exalead_data->query->context}/{$categorie->exclude_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a> |
| 101 | </div> |
| 102 | {/if} |
| 103 | {/foreach} |
| 104 | </div> |
| 105 | {/foreach} |
| 106 | {/if} |
| 107 | |
| 108 | *} |
| 109 | |
| 110 | |
| 111 | {if $exalead_data->keywords} |
| 112 | <div class="exa_groupe"> |
| 113 | <div class="titre">Affiner la recherche par mot-clés :</div> |
| 114 | {foreach from=$exalead_data->keywords item=keyword} |
| 115 | {if !$keyword->is_normal()} |
| 116 | {if $keyword->is_excluded()} |
| 117 | <div class="exa_categorie"> |
| 118 | <span style="text-decoration: line-through;"> |
| 119 | <a href="?_C={$exalead_data->query->context}/{$keyword->reset_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" /> |
| 120 | {$keyword->display}</a> |
| 121 | </span> |
| 122 | </div> |
| 123 | {else} |
| 124 | <div class="exa_categorie"> |
| 125 | <strong>{$keyword->display}</strong> |
| 126 | <a href="?_C={$exalead_data->query->context}/{$keyword->reset_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a> |
| 127 | </div> |
| 128 | {/if} |
| 129 | {else} |
| 130 | <div class="exa_categorie"> |
| 131 | <a href="?_C={$exalead_data->query->context}/{$keyword->refine_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" /> |
| 132 | {$keyword->display} ({$keyword->count})</a> |
| 133 | <a href="?_C={$exalead_data->query->context}/{$keyword->exclude_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a> |
| 134 | </div> |
| 135 | {/if} |
| 136 | {/foreach} |
| 137 | </div> |
| 138 | {/if} |
| 139 | </td> |
| 140 | <td class="exa_right"> |
| 141 | {if $exalead_data->start > 0} |
| 142 | {if $exalead_data->start < 9} |
| 143 | <a href=?_C={$exalead_data->query->context}&_s=0">[1-10]</a> |
| 144 | {else} |
| 145 | <a href="?_C={$exalead_data->query->context}&_s={$exalead_data->start-10}">[{$exalead_data->start-9}-{$exalead_data->end-9}]</a> |
| 146 | {/if} |
| 147 | {/if} |
| 148 | |
| 149 | Classer |
| 150 | <a href="?_C={$exalead_data->query->context}/_sf=-date&_f=xml2">[par date]</a> |
| 151 | <a href="?_C={$exalead_data->query->context}/_sf=relevance&_f=xml2">[par pertinence]</a> |
| 152 | |
| 153 | {if $exalead_data->end + 1 < $exalead_data->nhits} |
| 154 | {if $exalead_data->end + 11 > $exalead_data->nhits} |
| 155 | <a href="?_C={$exalead_data->query->context}&_s={$exalead_data->start+10}">[{$exalead_data->start+11}-{$exalead_data->nhits}]</a> |
| 156 | {else} |
| 157 | <a href="?_C={$exalead_data->query->context}&_s={$exalead_data->start+10}">[{$exalead_data->start+11}-{$exalead_data->end+11}]</a> |
| 158 | {/if} |
| 159 | {/if} |
| 160 | |
| 161 | {foreach from=$exalead_data->hits item=hit} |
| 162 | <div class="exa_result"> |
| 163 | <div class="header"> |
| 164 | <a href="{$hit->url|regex_replace:"!(\?|\&|&)PHPSESSID=.*$!":""}">{$hit->url|regex_replace:"!(\?|\&|&)PHPSESSID=.*$!":""}</a> |
| 165 | </div> |
| 166 | {foreach from=$hit->hitgroups item=hitgroup} |
| 167 | <div class="field"> |
| 168 | {$hitgroup->title} : |
| 169 | {if $hitgroup->hitcategories[0]->browsehref} |
| 170 | <a href="?_C={$exalead_data->query->context}/{$hitgroup->hitcategories[0]->browsehref}">{$hitgroup->hitcategories[0]->display}</a> |
| 171 | {else} |
| 172 | {$hitgroup->hitcategories[0]->display} |
| 173 | {/if} |
| 174 | </div> |
| 175 | {/foreach} |
| 176 | </div> |
| 177 | {/foreach} |
| 178 | {/if} |
| 179 | </td> |
| 180 | </tr> |
| 181 | </table> |
| 182 | {/if} |
| 183 | |
| 184 | {* vim:set et sw=2 sts=2 sws=2: *} |