From 5ad32e6894ba18ce242abb73b6280ce545f38382 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Mon, 26 Jan 2015 22:53:57 +0100 Subject: [PATCH] link from hostingpackage detail view to 'add_website' --- .../customerhostingpackage_detail.html | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gnuviechadmin/templates/hostingpackages/customerhostingpackage_detail.html b/gnuviechadmin/templates/hostingpackages/customerhostingpackage_detail.html index f487f4f..f3c7634 100644 --- a/gnuviechadmin/templates/hostingpackages/customerhostingpackage_detail.html +++ b/gnuviechadmin/templates/hostingpackages/customerhostingpackage_detail.html @@ -90,23 +90,36 @@ {% for domain in domains %} {{ domain.domain }} - {% if domain.domain.maildomain %} + {% if domain.domain.maildomain.mailaddress_set.exists %} {% with maildomain=domain.domain.maildomain %} {% for mailaddress in maildomain.mailaddresses %}{% spaceless %} {{ mailaddress }} - - {% endspaceless %}{% if not forloop.last %}, {% endif %} - {% endfor %} + {% trans "Delete mail address" %} + {% endspaceless %}{% if not forloop.last %}, {% endif %}{% endfor %} + {% endwith %} + + {% else %} + {% trans "None" %} + {% endif %} + {% if domain.domain.website_set.exists %} + + {% with domain=domain.domain %} + {% for website in domain.website_set.all %}{% spaceless %} + {{ website }} + {% trans "Delete website" %} + {% endspaceless %}{% if not forloop.last %}, {% endif %}{% endfor %} {% endwith %} {% else %} {% trans "None" %} {% endif %} - {% with maildomain=domain.domain.maildomain %} - + {% trans "Add mail address" %} + {% endwith %} + {% with hostingdomain=domain.domain %} + {% trans "Add website" %} {% endwith %}