Commit | Line | Data |
---|---|---|
905ab104 FB |
1 | {**************************************************************************} |
2 | {* *} | |
c441aabe | 3 | {* Copyright (C) 2003-2014 Polytechnique.org *} |
905ab104 FB |
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>Sondage : {$survey.title}</h1> | |
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"> | |
30 | <td colspan="2">{$survey.description|miniwiki|smarty:nodefaults}</td> | |
31 | </tr> | |
32 | <tr> | |
33 | <td class="titre">Fin du sondage :</td> | |
34 | <td>{$survey.end|date_format:"%x"}</td> | |
35 | </tr> | |
36 | <tr> | |
37 | <td class="titre">Type de sondage :</td> | |
38 | <td>{$survey_modes[$survey.mode]}</td> | |
39 | </tr> | |
40 | {if $survey.mode != Survey::MODE_ALL} | |
41 | <tr> | |
42 | <td class="titre">Promotions :</td> | |
43 | <td> | |
44 | {if $survey.promos eq "#"} | |
45 | <span class="erreur">erreur</span> | |
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> | |
66 | {if $survey_editmode && !$survey.valid} | |
67 | {assign var="survey_editallmode" value=true} | |
68 | {/if} | |
69 | {if $survey_editmode} | |
70 | <td style="width: 30%"> | |
71 | <a href='survey/edit/question/root'>{icon name=page_edit alt="Modifier" title="Modifier la description"}</a> | |
72 | {if $survey_editallmode}<br /><a href='survey/edit/add/0'>{icon name=add title="Ajouter une question au début" alt="Ajouter"}</a>{/if} | |
73 | </td> | |
74 | {/if} | |
75 | </tr> | |
76 | {if is_array($survey.questions)} | |
77 | {foreach from=$survey.questions item=squestion} | |
78 | <tr> | |
79 | <td> | |
80 | {include file='survey/show_question.tpl' squestion=$squestion} | |
81 | </td> | |
82 | {if $survey_editallmode} | |
83 | <td class="smaller" style="width: 30%; vertical-align: middle"> | |
84 | <a href='survey/edit/question/{$squestion.id}'>{icon name=page_edit title="Modifier cette question" alt="Modifier"}</a><br /> | |
85 | <a href='survey/edit/del/{$squestion.id}'>{icon name=delete title="Supprimer cette question" alt="Supprimer"}</a><br /> | |
86 | <a href='survey/edit/add/{$squestion.id+1}'>{icon name=add title="Ajouter une question après" alt="Ajouter"}</a> | |
87 | </td> | |
88 | {/if} | |
89 | </tr> | |
90 | {/foreach} | |
91 | {/if} | |
92 | </table> | |
93 | <p class="center"> | |
94 | {if $smarty.session.survey_validate || ($survey_editmode && !$survey_updatemode)} | |
95 | <a href='survey/edit/valid'> | |
96 | {icon name=tick} | |
97 | Proposer ce sondage | |
98 | </a> | | |
99 | <a href='survey/edit/cancel'> | |
100 | {icon name=cross} | |
101 | Annuler totalement la création de ce sondage | |
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> | |
115 | </form> | |
116 | ||
448c8cdc | 117 | {* vim:set et sw=2 sts=2 ts=8 fenc=utf-8: *} |