1 {% extends
"layout.html" %}
5 <div class=
"span6 well">
6 <form action=
"{{ url_for('admin_vote_edit', voteid=vote.id) }}" method=
"post" class=
"form-horizontal">
7 <fieldset><legend>Édition du vote
</legend>
8 <div class=
"control-group">
9 <label class=
"control-label" for=
"title">Titre
</label>
10 <div class=
"controls">
11 <input type=
"text" size=
30 name=
"title" id=
"title" value=
"{{ vote.title }}" />
12 <span class=
"help-inline"><font color=
"red">*
</font></span>
15 <div class=
"control-group">
16 <label class=
"control-label" for=
"description">Description
</label>
17 <div class=
"controls">
18 <textarea class=
"input-xlarge" name=
"description" id=
"description">{{ vote.description }}
</textarea>
21 <div class=
"accordion">
22 <div class=
"accordion-group">
23 <div class=
"accordion-heading">
24 <a class=
"accordion-toggle" data-toggle=
"collapse" href=
"#infos">+ Informations
</a>
26 <div id=
"infos" class=
"accordion-body collapse">
27 <div class=
"accordion-inner">
28 <div class=
"control-group">
29 <label class=
"control-label" for=
"category">Catégorie
</label>
30 <div class=
"controls">
31 <input type=
"text" data-provide=
"typeahead" data-source='[
"ca",
"membres"]' size=
30 name=
"category" id=
"category" value=
"{{ vote.category }}" />
34 <div class=
"control-group">
35 <label class=
"control-label" for=
"role">Groupe
</label>
36 <div class=
"controls">
37 <select name=
"role" id=
"role" disabled
>
38 <option>{{ group.name }}
</option>
40 <p class=
"help-block">Groupe d'utilisateur concernés par le vote et ayant le droit de voter
</p>
43 <div class=
"control-group">
44 <label class=
"control-label" for=
"days">Durée (jours)
</label>
45 <div class=
"controls">
46 <select class=
"span1" name=
"days" id=
"days">
47 {% for i in range(
1,
31) %}
48 {% if i == vote.duration %}
49 <option selected
>{{ i }}
</option>
51 <option>{{ i }}
</option>
55 <span class=
"help-inline">Du {{ vote.date_begin }} au {{ vote.date_end }}
</span>
61 <div class=
"accordion-group">
62 <div class=
"accordion-heading">
63 <a class=
"accordion-toggle" data-toggle=
"collapse" href=
"#options">+ Options
</a>
65 <div id=
"options" class=
"accordion-body collapse">
66 <div class=
"accordion-inner">
67 <div class=
"control-group">
68 <label class=
"control-label">Options
</label>
69 <div class=
"controls">
70 <label class=
"checkbox">
71 <input type=
"checkbox" name=
"transparent" {% if vote.is_transparent ==
1 %} checked {% endif %}
/>
72 Les votants peuvent-ils voir le choix des autres ?
74 <label class=
"checkbox">
75 <input type=
"checkbox" name=
"public" {% if vote.is_public ==
1 %} checked {% endif %}
/>
76 Le vote est-il visible par tous ?
78 {% if not vote.is_terminated ==
1 %}
79 <label class=
"checkbox">
80 <input type=
"checkbox" name=
"multiplechoice" {% if vote.is_multiplechoice ==
1 %} checked {% endif %} disabled
/>
81 Les votants peuvent-ils choisir plusieurs options ?
90 <div class=
"control-group">
91 <label class=
"control-label" for=
"status">Statut
</label>
92 <div class=
"controls">
93 <select class=
"span2" name=
"status" id=
"status">
94 {% if vote.is_terminated ==
1 %}
95 <option>Fermé
</option>
96 <option>Ouvert
</option>
97 <option selected
>Terminé
</option>
99 {% if vote.is_open ==
1 %}
100 <option>Fermé
</option>
101 <option selected
>Ouvert
</option>
102 <option>Terminé
</option>
104 <option selected
>Fermé
</option>
105 <option>Ouvert
</option>
111 <div class=
"form-actions">
112 <input type=
"submit" class=
"btn btn-primary" value=
"Enregistrer" />
113 <input type=
"reset" class=
"btn" value=
"Annuler" />
119 {% if not vote.is_terminated ==
1%}
120 <div class=
"span5 well pull-right">
121 <fieldset><legend>Choix
</legend>
122 <table class=
"table table-stripped table-condensed">
130 {% for choice in choices %}
132 <form action=
"{{ url_for('admin_vote_editchoice', voteid=vote.id, choiceid=choice.id) }}" method=
"post">
133 <td><input type=
"text" name=
"title" value=
"{{ choice.name }}" /></td>
134 <td><input type=
"submit" class=
"btn btn-small" value=
"Sauver" />
135 <a href=
"{{ url_for('admin_vote_deletechoice', voteid=vote.id, choiceid=choice.id) }}" class=
"btn btn-small btn-danger">Supprimer
</a></td>
142 <form action=
"{{ url_for('admin_vote_addchoice', voteid=vote.id) }}" method=
"post">
143 <td><input type=
"text" name=
"title" value=
"Nouveau choix" /></td>
144 <td><input type=
"submit" class=
"btn btn-small btn-primary" value=
"+ Ajouter" />
153 <div class=
"span5 well pull-right">
154 <fieldset><legend>Pièces jointes
</legend>
155 <table class=
"table table-stripped table-condensed">
163 {% for attachment in attachments %}
165 <td>{{ attachment.url }}
</td>
166 <td><a href=
"{{ url_for('admin_vote_deleteattachment', voteid=vote.id, attachmentid=attachment.id) }}" class=
"btn btn-small btn-danger">Supprimer
</a></td>
172 <form action=
"{{ url_for('admin_vote_addattachment', voteid=vote.id) }}" method=
"post">
173 <td><input type=
"text" name=
"url" value=
"Nouveau document" /></td>
174 <td><input type=
"submit" class=
"btn btn-small btn-primary" value=
"+ Ajouter" />