Commit | Line | Data |
---|---|---|
c144f2e5 | 1 | {**************************************************************************} |
2 | {* *} | |
9f5bd98e | 3 | {* Copyright (C) 2003-2010 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> | |
02125f19 | 40 | {if $survey.mode != Survey::MODE_ALL} |
0f396347 | 41 | <tr> |
02125f19 | 42 | <td class="titre">Promotions :</td> |
0f396347 | 43 | <td> |
aab2ffdd | 44 | {if $survey.promos eq "#"} |
0dc8c5a4 | 45 | <span class="erreur">erreur</span> |
aab2ffdd SJ |
46 | {elseif $survey.promos eq ""} |
47 | aucune restriction | |
48 | {else} | |
49 | {$survey.promos} | |
0f396347 | 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} | |
e1635d73 SJ |
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 | |
0f396347 | 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} | |
0dc8c5a4 | 70 | <td style="width: 30%"> |
e996f250 PC |
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} | |
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"> |
e996f250 PC |
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> | |
0f396347 | 87 | </td> |
3d8decf9 | 88 | {/if} |
0f396347 | 89 | </tr> |
56c6950a | 90 | {/foreach} |
0f396347 | 91 | {/if} |
92 | </table> | |
93 | <p class="center"> | |
b3796380 | 94 | {if $smarty.session.survey_validate || ($survey_editmode && !$survey_updatemode)} |
0f396347 | 95 | <a href='survey/edit/valid'> |
02125f19 | 96 | {icon name=tick} |
e996f250 | 97 | Proposer ce sondage |
0f396347 | 98 | </a> | |
99 | <a href='survey/edit/cancel'> | |
e996f250 PC |
100 | {icon name=cross} |
101 | Annuler totalement la création de ce sondage | |
0f396347 | 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: *} |