Renamed role table into groups, and debug
[cavote.git] / templates / admin_groups.html
diff --git a/templates/admin_groups.html b/templates/admin_groups.html
new file mode 100644 (file)
index 0000000..966372e
--- /dev/null
@@ -0,0 +1,48 @@
+{% extends "layout.html" %}
+{% block subtitle %}Administrer les votes{% endblock %}
+{% block body %}
+<div class="row">
+<div class="span6 well">
+  <h2>Groupes</h2>
+  <hr />
+  {% if not groups %}
+  <div class="alert">Il n'y a aucun group.</div>
+  {% else %}
+  <table class="table table-stripped">
+    <thead>
+    <tr>
+      <th>Nom</th>
+      <th>Membres</th>
+      <th>Votes</th>
+      <th>Actions</th>
+    </tr>
+    </thead>
+    <tbody>
+    {% for group in groups %}
+    <tr>
+        <td><strong>{{ group.name }}</strong></td>
+        <td>TODO</td>
+        <td>TODO</td>
+        <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>
+    </tr>
+    {% endfor %}
+    </tbody>
+  </table>
+  <p>
+  <small>Les groupes « system » ne sont pas modifiables.</small>
+  </p>
+  {% endif %}
+</div>
+
+<div class="span5 well">
+  <form action="{{ url_for('admin_group_add') }}" method="post" class="form-inline">
+  <fieldset><legend>Ajouter un groupe</legend>
+      <br />
+      <input type="text" name="name" id="name" value="Nom" />
+      <input type="submit" class="btn btn-primary" value="Ajouter" />
+  </fieldset>
+  </form>
+</div>
+</div>
+{% endblock %}
+