30602cbfc401537df3a0258b22d94970990bedf4
[cavote.git] / templates / vote.html
1 {% extends "layout.html" %}
2 {% block body %}
3 <div class="row">
4 <div class="span9">
5 <h2 class='page-header'>{{ vote.title }}</h2>
6 <table class="table table-condensed table-striped table-bordered">
7 <thead>
8 <tr>
9 <th></th>
10 {% for choice in choices %}
11 <th>{{ choice.name }}</th>
12 {% endfor %}
13 <th></th>
14 </tr>
15 </thead>
16
17 <tbody>
18 {% if vote.is_transparent %}
19 <!-- :TODO:maethor:20120528: Afficher les votes ici -->
20 {% else %}
21 <div class="alert alert-info">Ce sondage n'est pas transparent, vous ne pouvez pas voir les votes des autres.</div>
22 <!-- :TODO:maethor:20120528: Afficher le vote de l'utilisateur -->
23 {% endif %}
24
25 {% if can_vote %}
26 <form class="form-inline" action=""> <!-- :TODO:maethor:20120528: Route -->
27 <tr>
28 <td><input type='text' name="username" value='{{ session.user.name }}' disabled /></td>
29 {% if vote.is_multiple %}
30 {% for choice in choices %}
31 <td><input type='checkbox' name="{{ choice.id }}" /></td>
32 {% endfor %}
33 {% else %}
34 {% for choice in choices %}
35 <td><input type='radio' name="choice" value="{{ choice.id }}" /></td>
36 {% endfor %}
37 {% endif %}
38 <td><input type="submit" class="btn btn-primary" value="OK" /></td>
39 </tr>
40 </form>
41 {% endif %}
42 </tbody>
43 <tfoot>
44 {% if vote.is_transparent %}
45 <tr>
46 <td style="text-align: right">Somme</td>
47 {% for choice in choices %}
48 <td>nb</td>
49 {% endfor %}
50 <td></td>
51 </tr>
52 {% endif %}
53 </tfoot>
54 </table>
55 </div>
56
57 <div class="span3">
58 <h3>Informations</h3>
59 <dl class="dl-horizontal">
60 <dt>Publié par <dd><code>maethor</code>
61 <dt>Début le <dd><code>{{ vote.date_begin }}</code>
62 <dt>Deadline le <dd><code>{{ vote.date_end }}</code>
63 <dt>Groupe <dd><code>{{ vote.rolename }}</code>
64 <dt>Catégorie <dd><code>{{ vote.category }}</code>
65 </dl>
66 <dl>
67 <dt>Description : <dd>{{ vote.description }}
68 <dt>Documents :<dd>
69 <ul>
70 {% for attachment in attachments %}
71 <li><a href="{{ attachment.url }}">{{ attachment.url }}</a></li>
72 {% endfor %}
73 </ul>
74 </li>
75 </dl>
76 </div>
77
78 </div>
79 {% endblock %}
80