Do not show add_mailaddress for nonexistant mail domain

Fixes #7
This commit is contained in:
Jan Dittberner 2020-04-13 14:57:20 +02:00
parent 000391a808
commit 2328abe8db
2 changed files with 8 additions and 3 deletions

View file

@ -1,6 +1,9 @@
Changelog
=========
* :bug:`7` fix handling of undefined mail domains in customer hosting package
detail template
* :release:`0.12.0 <2020-04-10>`
* :support:`-` add architecture diagramm for documentation
* :support:`-` drop environment specific settings

View file

@ -116,9 +116,11 @@
<td class="text-info">{% trans "None" %}</td>
{% endif %}
<td>
{% with maildomain=domain.domain.maildomain %}
<a href="{% url 'add_mailaddress' package=hostingpackage.id domain=maildomain.domain %}" title="{% trans "Add mail address" %}"><i class="fa fa-envelope"></i><span class="sr-only"> {% trans "Add mail address" %}</span></a>
{% endwith %}
{% if domain.domain.maildomain %}
{% with maildomain=domain.domain.maildomain %}
<a href="{% url 'add_mailaddress' package=hostingpackage.id domain=maildomain.domain %}" title="{% trans "Add mail address" %}"><i class="fa fa-envelope"></i><span class="sr-only"> {% trans "Add mail address" %}</span></a>
{% endwith %}
{% endif %}
{% with hostingdomain=domain.domain %}
<a href="{% url 'add_website' package=hostingpackage.id domain=hostingdomain.domain %}" title="{% trans "Add website" %}"><i class="glyphicon glyphicon-globe"></i><span class="sr-only"> {% trans "Add website" %}</span></a>
{% endwith %}