admin tab invitations with export capability
[pithos] / pithos / im / templates / invitations_list.html
1 {% extends "base.html" %}
2
3 {% load formatters %}
4
5 {% block body %}
6
7 <div class="row">
8   <div class="offset10 span3">
9     <form method="get">
10       <div class="input">
11         <input class="span3" name="filter" type="search" placeholder="search" value="{{ filter }}">
12       </div>
13     </form>
14   </div>
15 </div>
16
17 <table class="zebra-striped id-sorted">
18   <thead>
19     <tr>
20       <th>ID</th>
21       <th>Uniq</th>
22       <th>Real Name</th>
23       <th>Code</th>
24       <th>Inviter Uniq</th>
25       <th>Inviter Real Name</th>
26       <th>Is_accepted</th>
27       <th>Created</th>
28       <th>Accepted</th>
29     </tr>
30   </thead>
31   <tbody>
32     {% for inv in invitations %}
33     <tr>
34       <td>{{ inv.id }}</td>
35       <td>{{ inv.uniq }}</td>
36       <td>{{ inv.realname }}</td>
37       <td>{{ inv.code }}</td>
38       <td>{{ inv.inviter.uniq }}</td>
39       <td>{{ inv.inviter.realname }}</td>
40       <td>{{ inv.is_accepted }}</td>
41       <td>{{ inv.created }}</td>
42       <td>{{ inv.accepted }}</td>
43     </tr>
44     {% endfor %}
45   </tbody>
46 </table>
47
48 {% if pages|length > 1 %}
49 <div class="pagination">
50   <ul>
51     {% if prev %}
52       <li class="prev"><a href="?page={{ prev }}{% if filter %}&filter={{ filter }}{% endif %}">&larr; Previous</a></li>
53     {% else %}
54       <li class="prev disabled"><a href="#">&larr; Previous</a></li>
55     {% endif %}
56
57     {% for p in pages %}
58       <li{% if page == p %} class="active"{% endif %}><a href="?page={{ p }}{% if filter %}&filter={{ filter }}{% endif %}">{{ p }}</a></li>
59     {% endfor %}
60
61     {% if next %}
62       <li class="next"><a href="?page={{ next }}{% if filter %}&filter={{ filter }}{% endif %}">&rarr; Next</a></li>
63     {% else %}
64       <li class="next disabled"><a href="#">&rarr; Next</a></li>
65     {% endif %}
66   </ul>
67 </div>
68 {% endif %}
69
70 <form action="{% url pithos.im.views.invitations_export %}" method="post">
71 <button  type="submit" class="btn primary">Export</button>
72 </form>
73
74 <br /><br />
75 {% endblock body %}