mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Move domain add button.
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
{% extends "admin/listing.html" %}{% load i18n admin_tags lib_tags %}
|
||||
{% extends "admin/listing.html" %}
|
||||
{% load i18n admin_tags lib_tags %}
|
||||
|
||||
{% block pagetitle %}{% trans "Domains" %}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{{ block.super }}
|
||||
{% extra_static_content "domains" "css" user %}
|
||||
{{ block.super }}
|
||||
{% extra_static_content "domains" "css" user %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
@@ -19,6 +20,14 @@ $(document).ready(function() {
|
||||
{% extra_static_content "domains" "js" user %}
|
||||
{% endblock %}
|
||||
|
||||
{% block toolbar_right %}
|
||||
{% if perms.admin.add_domain %}
|
||||
<a href="{% url 'admin:domain_add' %}" class="btn btn-primary" data-toggle="ajaxmodal" modalcb="admin.newdomain_cb">
|
||||
<span class="fa fa-plus"></span> {% trans "Add" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}{% domains_menu "domains" user %}{% endblock %}
|
||||
|
||||
{% block table_header %}
|
||||
|
||||
@@ -47,14 +47,6 @@ def domains_menu(selection, user, ajax_mode=True):
|
||||
"url": reverse("admin:domain_statistics")}
|
||||
]
|
||||
if user.has_perm("admin.add_domain"):
|
||||
entries += [
|
||||
{"name": "newdomain",
|
||||
"label": _("Add domain"),
|
||||
"img": "fa fa-plus",
|
||||
"modal": True,
|
||||
"modalcb": "admin.newdomain_cb",
|
||||
"url": reverse("admin:domain_add")},
|
||||
]
|
||||
entries += events.raiseQueryEvent("ExtraDomainMenuEntries", user)
|
||||
entries += [
|
||||
{"name": "import",
|
||||
|
||||
Reference in New Issue
Block a user