Add mailing list headers to newsletters
[platal.git] / templates / newsletter / search.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2013 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 {if $nl_search}
24 <h1>
25   {$nl->name}
26 </h1>
27 {/if}
28
29 <h2>Rechercher dans les archives</h2>
30
31 <form action="{$nl->prefix()}/search" method="post">
32   {xsrf_token_field}
33   <p>
34   <select name="nl_search_type">
35     <optgroup label="Recherche gobale">
36       <option value="1" {if $nl_search_type eq 1}selected="selected"{/if}>N'importe où dans les lettres</option>
37     </optgroup>
38     <optgroup label="Recherche dans les articles">
39       <option value="2" {if $nl_search_type eq 2}selected="selected"{/if}>N'importe où dans les articles</option>
40       <option value="3" {if $nl_search_type eq 3}selected="selected"{/if}>Dans les titres des articles</option>
41       <option value="4" {if $nl_search_type eq 4}selected="selected"{/if}>Dans les corps des articles</option>
42       <option value="5" {if $nl_search_type eq 5}selected="selected"{/if}>Dans les appendices des articles</option>
43     </optgroup>
44     <optgroup label="Recherche dans le reste des lettres">
45       <option value="6" {if $nl_search_type eq 6}selected="selected"{/if}>N'importe où dans le reste des lettres</option>
46       <option value="7" {if $nl_search_type eq 7}selected="selected"{/if}>Dans les titres des emails/lettres</option>
47       <option value="8" {if $nl_search_type eq 8}selected="selected"{/if}>Dans les chapeaux/contenus des lettres</option>
48       <option value="9" {if $nl_search_type eq 9}selected="selected"{/if}>Dans les signatures des lettres</option>
49     </optgroup>
50   </select>
51   <input type="text" name="nl_search" value="{$nl_search}" />
52   </p>
53   <p class="center"><input type="submit" value="Chercher" /></p>
54 </form>
55
56 {if $nl_search}
57 <h2>{$results_count} résultat{if $results_count > 1}s{/if} pour cette recherche</h2>
58
59 {if t($res_articles) && $res_articles|@count}
60 {$articles_count} article{if $articles_count > 1}s{/if} correspondant{if $articles_count > 1}s{/if}&nbsp;:
61 <ul>
62   {foreach from=$res_articles item=article}
63   <li><a href="{$nl->prefix()}/show/{$article.short_name}#art{$article.aid}">{$article.title|default:"[Sans titre]"}</a></li>
64   {/foreach}
65 </ul>
66 {/if}
67
68 {if t($res_issues) && $res_issues|@count}
69 {$issues_count} lettre{if $issues_count > 1}s{/if} correspondate{if $issues_count > 1}s{/if}&nbsp;:
70 <ul>
71   {foreach from=$res_issues item=issue}
72   <li><a href="{$nl->prefix()}/show/{$issue->id()}">{$issue->title()|default:"[Sans titre]"}</a></li>
73   {/foreach}
74 </ul>
75 {/if}
76
77 {/if}
78
79 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}