groups/directory: display a nice message when there is nobody in a group
[xnet] / xnet / groups / templates / groups / directory.html
1 {% extends "groups/base.html" %}
2 {% load static %}
3
4 {% block content %}
5 <div class="group-dirctory">
6 <h1>{{ group.name }}</h1>
7 {% if is_admin %}
8 <form>
9 <div class="input-prepend input-append">
10 <span class="add-on"><i class="icon-envelope"></i></span>
11 <input type="text" class="input-xlarge" type="email" required placeholder="Email">
12 <div class="btn-group">
13 <button class="btn" tabindex="-1">Ajouter</button>
14 <button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1">
15 <span class="caret"></span>
16 </button>
17 <ul class="dropdown-menu">
18 <li><a href="#">Action</a></li>
19 <li><a href="#">Another action</a></li>
20 <li><a href="#">Something else here</a></li>
21 <li class="divider"></li>
22 <li><a href="#">Separated link</a></li>
23 </ul>
24 </div>
25 </div>
26 </form>
27 {% endif %}
28 {% if memberships %}
29 <table class="table table-striped" id="directory">
30 <thead>
31 <tr>
32 <th>Nom</th>
33 <th>Promo</th>
34 <th>Contact</th>
35 <th filter="false"></th>
36 </tr>
37 </thead>
38 <tbody>
39 {% for memb in memberships %}
40 <tr>
41 <td>
42 <span {% if memb.is_admin %}class="admin"{% endif %}>
43 {{ memb.user }}
44 </span>
45 </td>
46 <td>PROMO</td>
47 <td>
48 <a href="mailto:{{ memb.email }}">
49 <i class="icon-envelope"></i>
50 </a>
51 {% if is_admin %}
52 <i class="icon-pencil"></i>
53 <a href="{% url 'groups:membership-delete' group.short memb.user.username %}">
54 <i class="icon-trash"></i>
55 </a>
56 {% endif %}
57 </td>
58 </tr>
59 {% endfor %}
60 </tbody>
61 </table>
62 {% else %}
63 <p class="pull-left">
64 Il n'y a personne dans ce groupe.
65 </p>
66 {% endif %}
67 </div>
68 {% endblock %}