show_roles.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% extends "layout.html" %}
  2. {% block body %}
  3. <div class="row">
  4. <div class="span6 well">
  5. <h2>Groupes</h2>
  6. <hr />
  7. {% if not roles %}
  8. <div class="alert">Il n'y a aucun role.</div>
  9. {% else %}
  10. <table class="table table-stripped">
  11. <thead>
  12. <tr>
  13. <th>Nom</th>
  14. <th>Membres</th>
  15. <th>Votes</th>
  16. <th>Actions</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. {% for role in roles %}
  21. <tr>
  22. <td><strong>{{ role.name }}</strong></td>
  23. <td>TODO</td>
  24. <td>TODO</td>
  25. <td>{% if role.system %}<span class="label label-warning">system</span>{% else %}<a href="{{ url_for('del_role', idrole=role.id) }}" class="btn btn-danger btn-mini">Supprimer</a>{% endif %}</td>
  26. </tr>
  27. {% endfor %}
  28. </tbody>
  29. </table>
  30. <p>
  31. <small>Les groupes « system » ne sont pas modifiables.</small>
  32. </p>
  33. {% endif %}
  34. </div>
  35. <div class="span5 well">
  36. <form action="{{ url_for('add_role') }}" method="post" class="form-inline">
  37. <fieldset><legend>Ajouter un groupe</legend>
  38. <br />
  39. <input type="text" name="name" id="name" value="Nom" />
  40. <input type="submit" class="btn btn-primary" value="Ajouter" />
  41. </fieldset>
  42. </form>
  43. </div>
  44. </div>
  45. {% endblock %}