some changes in survey module
[platal.git] / templates / survey / index.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2007 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 <h1>Sondages</h1>
24
25 <table class="bicol">
26   <tr>
27     <th>
28       Sondages en cours
29     </th>
30   </tr>
31   {iterate item=s from=$survey_current}
32     {if $smarty.session.auth || $s.mode == Survey::MODE_ALL}
33   <tr class="{cycle values="impair,pair"}">
34     <td class="half">
35       &bull;
36       <a href="survey/vote/{$s.id}">
37         {$s.title} [{$s.end|date_format:"%x"} - {$survey_modes[$s.mode]}]
38       </a>
39     </td>
40   </tr>
41       {assign var="has_cs" value="true"}
42     {/if}
43   {/iterate}
44   {if !$has_cs}
45   <tr>
46     <td class="half">Aucun sondage en cours</td>
47   </tr>
48   {/if}
49 </table>
50
51 <br />
52
53 <table class="bicol">
54   <tr>
55     <th>
56       Anciens sondages
57     </th>
58   </tr>
59   {iterate item=s from=$survey_old}
60     {if $smarty.session.auth || $s.mode == Survey::MODE_ALL}
61   <tr class="{cycle values="impair,pair"}">
62     <td class="half">
63       &bull;
64       <a href="survey/result/{$s.id}">
65         {$s.title} [{$s.end|date_format:"%x"} - {$survey_modes[$s.mode]}]
66       </a>
67     </td>
68   </tr>
69       {assign var="has_os" value="true"}
70     {/if}
71   {/iterate}
72   {if !$has_os}
73   <tr>
74     <td class="half">Aucun ancien sondage</td>
75   </tr>
76   {/if}
77 </table>
78
79 <a href="./survey/edit/new">Proposer un sondage</a>
80
81 {* vim:set et sw=2 sts=2 ts=8 enc=utf-8: *}