Revision 1fefe48c
b/astakos/im/admin/templates/admin.html | ||
---|---|---|
3 | 3 |
{% block body %} |
4 | 4 |
<ul class="unstyled"> |
5 | 5 |
<li><strong>{{ stats.users }}</strong> User{{ stats.users|pluralize }} (<strong>{{ stats.pending }}</strong> pending)</li> |
6 |
<li><strong>{{ stats.invitations }}</strong> Invitation{{ stats.invitations|pluralize }} sent (<strong>{{ stats.invitations_consumed }}</strong> consumed)</li>
|
|
6 |
<li><strong>{{ stats.invitations }}</strong> Invitation{{ stats.invitations|pluralize }} sent (<strong>{{ stats.invitations_consumed }}</strong> used)</li>
|
|
7 | 7 |
</ul> |
8 | 8 |
{% endblock body %} |
b/astakos/im/admin/templates/invitations_list.html | ||
---|---|---|
23 | 23 |
<th>Code</th> |
24 | 24 |
<th>Inviter email</th> |
25 | 25 |
<th>Inviter Real Name</th> |
26 |
<th>Is consumed</th>
|
|
26 |
<th>Is used?</th>
|
|
27 | 27 |
<th>Created</th> |
28 | 28 |
<th>Consumed</th> |
29 | 29 |
</tr> |
b/astakos/im/templates/im/invitations.html | ||
---|---|---|
12 | 12 |
<tr> |
13 | 13 |
<th>Email</th> |
14 | 14 |
<th>Real Name</th> |
15 |
<th>Consumed</th>
|
|
15 |
<th>Used</th>
|
|
16 | 16 |
</tr> |
17 | 17 |
</thead> |
18 | 18 |
<tbody> |
19 | 19 |
{% for inv in sent %} |
20 |
<tr class="{% if inv.is_consumed %}consumed{% endif %}">
|
|
20 |
<tr class="{% if inv.is_consumed %}used{% endif %}">
|
|
21 | 21 |
<td>{{ inv.email }}</td> |
22 | 22 |
<td>{{ inv.realname }}</td> |
23 | 23 |
<td class="consumed">{% if inv.is_consumed %}Yes{% else %}No{% endif %}</td> |
b/astakos/im/util.py | ||
---|---|---|
116 | 116 |
return |
117 | 117 |
invitation = Invitation.objects.get(code = code) |
118 | 118 |
if invitation.is_consumed: |
119 |
raise ValueError(_('Invitation is consumed'))
|
|
119 |
raise ValueError(_('Invitation is used'))
|
|
120 | 120 |
try: |
121 | 121 |
AstakosUser.objects.get(email = invitation.username) |
122 | 122 |
raise ValueError(_('Email: %s is reserved' % invitation.username)) |
Also available in: Unified diff