Interface details
[cavote.git] / templates / admin_groups.html
1 {% extends "layout.html" %}
2 {% block subtitle %}Administrer les votes{% endblock %}
3 {% block body %}
4 <div class="row">
5 <div class="span6 well">
6 <h2>Groupes</h2>
7 <hr />
8 {% if not groups %}
9 <div class="alert">Il n'y a aucun group.</div>
10 {% else %}
11 <table class="table table-stripped">
12 <thead>
13 <tr>
14 <th>Nom</th>
15 <th>Membres</th>
16 <th>Votes</th>
17 <th>Actions</th>
18 </tr>
19 </thead>
20 <tbody>
21 {% for group in groups %}
22 <tr>
23 <td><strong>{{ group.name }}</strong></td>
24 <td>{{ group.nb_users }}</td>
25 <td>{{ group.nb_votes }}</td>
26 <td>{% if group.system %}<span class="label label-warning">system</span>{% else %}<a href="{{ url_for('admin_group_del', idgroup=group.id) }}" class="btn btn-danger btn-mini">Supprimer</a>{% endif %}</td>
27 </tr>
28 {% endfor %}
29 </tbody>
30 </table>
31 <p>
32 <small>Les groupes « system » ne sont pas modifiables.</small>
33 </p>
34 {% endif %}
35 </div>
36
37 <div class="span5 well">
38 <form action="{{ url_for('admin_group_add') }}" method="post" class="form-inline">
39 <fieldset><legend>Ajouter un groupe</legend>
40 <br />
41 <input type="text" name="name" id="name" value="Nom"
42 onfocus="if(this.value=='Nom')this.value='';"
43 onblur="if(this.value=='')this.value='Nom';" />
44 <input type="submit" class="btn btn-primary" value="Ajouter" />
45 </fieldset>
46 </form>
47 </div>
48 </div>
49 {% endblock %}
50