mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
@@ -11,7 +11,7 @@
|
||||
<tbody>
|
||||
{% for ident in identities %}
|
||||
<tr id="{{ ident.id }}" class="{% if not ident.enabled %}muted{% endif %}" name="{{ forloop.counter }}">
|
||||
<td name="identity">{{ ident.identity }}</td>
|
||||
<td name="identity">{% identity_modify_link ident %}</td>
|
||||
<td name="name_or_rcpt">{{ ident.name_or_rcpt }}</td>
|
||||
<td name="tags">{{ ident.tags|safe }}</td>
|
||||
<td name="actions">{% identity_actions user ident %}</td>
|
||||
|
||||
@@ -5,6 +5,7 @@ from django.core.urlresolvers import reverse
|
||||
from modoboa import admin
|
||||
from modoboa.lib import events
|
||||
from modoboa.lib.webutils import static_url, render_actions
|
||||
from modoboa.lib.templatetags.libextras import render_link
|
||||
|
||||
register = template.Library()
|
||||
|
||||
@@ -186,6 +187,17 @@ def identity_actions(user, ident):
|
||||
]
|
||||
return render_actions(actions)
|
||||
|
||||
@register.simple_tag
|
||||
def identity_modify_link(identity):
|
||||
linkdef = {"label" : identity.identity, "modal" : True}
|
||||
if identity.__class__.__name__ == "User":
|
||||
linkdef["url"] = reverse("modoboa.admin.views.editaccount", args=[identity.id])
|
||||
linkdef["modalcb"] = "admin.editaccount_cb"
|
||||
else:
|
||||
linkdef["url"] = reverse("modoboa.admin.views.editalias_dispatcher", args=[identity.id])
|
||||
linkdef["modalcb"] = "admin.aliasform_cb"
|
||||
return render_link(linkdef)
|
||||
|
||||
@register.simple_tag
|
||||
def domadmin_actions(daid, domid):
|
||||
actions = [dict(
|
||||
|
||||
Reference in New Issue
Block a user