c144f2e5 |
1 | {**************************************************************************} |
2 | {* *} |
8d84c630 |
3 | {* Copyright (C) 2003-2009 Polytechnique.org *} |
c144f2e5 |
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 | {**************************************************************************} |
56c6950a |
22 | |
e8439508 |
23 | <h1>Sondage : {$survey.title}</h1> |
0f396347 |
24 | <form action="survey/vote{if $survey_votemode}/{$survey.id}{/if}" method='post'> |
25 | <table style="width: 100%"> |
26 | <tr> |
27 | <td> |
28 | <table class="bicol"> |
29 | <tr class="pair"> |
89921039 |
30 | <td colspan="2">{$survey.description|miniwiki|smarty:nodefaults}</td> |
0f396347 |
31 | </tr> |
32 | <tr> |
e8439508 |
33 | <td class="titre">Fin du sondage :</td> |
0f396347 |
34 | <td>{$survey.end|date_format:"%x"}</td> |
35 | </tr> |
36 | <tr> |
e8439508 |
37 | <td class="titre">Type de sondage :</td> |
0f396347 |
38 | <td>{$survey_modes[$survey.mode]}</td> |
39 | </tr> |
40 | {if $survey.mode != Survey::MODE_ALL} |
41 | <tr> |
e8439508 |
42 | <td class="titre">Promotions :</td> |
0f396347 |
43 | <td> |
44 | {if $survey.promos eq "#"} |
45 | erreur |
46 | {elseif $survey.promos eq ""} |
47 | aucune restriction |
48 | {else} |
49 | {$survey.promos} |
50 | {/if} |
51 | </td> |
52 | </tr> |
53 | {/if} |
54 | {if $survey_warning} |
55 | <tr class="pair"> |
56 | <td colspan="2">{$survey_warning}</td> |
57 | </tr> |
58 | {/if} |
59 | </table> |
60 | {if $survey_resultmode} |
61 | <p class="smaller">{$survey.votes} personnes ont répondu à ce sondage.<br /> |
62 | Récupérer <a href="survey/result/{$survey.id}/csv">l'ensemble des résultats</a> au format csv |
63 | </p> |
64 | {/if} |
65 | </td> |
f82ee24d |
66 | {if $survey_editmode && !$survey.valid} |
67 | {assign var="survey_editallmode" value=true} |
0f396347 |
68 | {/if} |
69 | {if $survey_editmode} |
fe669610 |
70 | <td class="smaller" style="width: 30%"> |
f82ee24d |
71 | <a href='survey/edit/question/root'>{icon name=page_edit} Modifier la description</a> |
72 | {if $survey_editallmode}<br /><a href='survey/edit/add/0'>{icon name=add} Ajouter une question au début</a>{/if} |
0f396347 |
73 | </td> |
74 | {/if} |
75 | </tr> |
76 | {if is_array($survey.questions)} |
3d8decf9 |
77 | {foreach from=$survey.questions item=squestion} |
0f396347 |
78 | <tr> |
79 | <td> |
80 | {include file='survey/show_question.tpl' squestion=$squestion} |
81 | </td> |
f82ee24d |
82 | {if $survey_editallmode} |
fe669610 |
83 | <td class="smaller" style="width: 30%; vertical-align: middle"> |
0f396347 |
84 | <a href='survey/edit/question/{$squestion.id}'>{icon name=page_edit} Modifier cette question</a><br /> |
85 | <a href='survey/edit/del/{$squestion.id}'>{icon name=delete} Supprimer cette question</a><br /> |
86 | <a href='survey/edit/add/{$squestion.id+1}'>{icon name=add} Ajouter une question après</a> |
87 | </td> |
3d8decf9 |
88 | {/if} |
0f396347 |
89 | </tr> |
56c6950a |
90 | {/foreach} |
0f396347 |
91 | {/if} |
92 | </table> |
93 | <p class="center"> |
f82ee24d |
94 | {if $survey_editmode} |
0f396347 |
95 | <a href='survey/edit/valid'> |
96 | {icon name=tick} |
97 | {if $survey_updatemode}Enregistrer les modifications{else}Proposer ce sondage{/if} |
98 | </a> | |
99 | <a href='survey/edit/cancel'> |
100 | {icon name=cross} Annuler |
101 | {if $survey_updatemode}les modifications{else}totalement la création de ce sondage{/if} |
102 | </a> |
103 | {elseif $survey_adminmode} |
104 | {if !$survey.valid}<a href="survey/admin/valid/{$survey.id}">Valider ce sondage</a> | {/if} |
105 | <a href="survey/admin/edit/{$survey.id}">{icon name=tick} Modifier ce sondage</a> | |
106 | <a href="survey/admin/del/{$survey.id}">{icon name=cross} Supprimer ce sondage</a> | |
107 | <a href="survey/admin">Retour</a> |
108 | {elseif $survey_votemode} |
109 | <input type='submit' name='survey_submit' value='Voter'/> |
110 | <input type='submit' name='survey_cancel' value='Annuler'/> |
111 | {else} |
112 | <a href="survey">Retour</a> |
113 | {/if} |
114 | </p> |
3d8decf9 |
115 | </form> |
c144f2e5 |
116 | |
8b0fa81e |
117 | {* vim:set et sw=2 sts=2 ts=8 enc=utf-8: *} |