1 {**************************************************************************}
3 {* Copyright (C) 2003-2014 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
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. *}
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. *}
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 *}
21 {**************************************************************************}
23 <h1>Sondage : {$survey.title}</h1>
24 <form action="survey/vote{if $survey_votemode}/{$survey.id}{/if}" method='post'>
25 <table style="width: 100%">
30 <td colspan="2">{$survey.description|miniwiki|smarty:nodefaults}</td>
33 <td class="titre">Fin du sondage :</td>
34 <td>{$survey.end|date_format:"%x"}</td>
37 <td class="titre">Type de sondage :</td>
38 <td>{$survey_modes[$survey.mode]}</td>
40 {if $survey.mode != Survey::MODE_ALL}
42 <td class="titre">Promotions :</td>
44 {if $survey.promos eq "#"}
45 <span class="erreur">erreur</span>
46 {elseif $survey.promos eq ""}
56 <td colspan="2">{$survey_warning}</td>
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
66 {if $survey_editmode && !$survey.valid}
67 {assign var="survey_editallmode" value=true}
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}
76 {if is_array($survey.questions)}
77 {foreach from=$survey.questions item=squestion}
80 {include file='survey/show_question.tpl' squestion=$squestion}
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>
94 {if $smarty.session.survey_validate || ($survey_editmode && !$survey_updatemode)}
95 <a href='survey/edit/valid'>
99 <a href='survey/edit/cancel'>
101 Annuler totalement la création de ce sondage
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'/>
112 <a href="survey">Retour</a>
117 {* vim:set et sw=2 sts=2 ts=8 fenc=utf-8: *}