link from hostingpackage detail view to 'add_website'

This commit is contained in:
Jan Dittberner 2015-01-26 22:53:57 +01:00
parent 711a96212c
commit 5ad32e6894

View file

@ -90,23 +90,36 @@
{% for domain in domains %} {% for domain in domains %}
<tr> <tr>
<td>{{ domain.domain }}</td> <td>{{ domain.domain }}</td>
{% if domain.domain.maildomain %} {% if domain.domain.maildomain.mailaddress_set.exists %}
<td> <td>
{% with maildomain=domain.domain.maildomain %} {% with maildomain=domain.domain.maildomain %}
{% for mailaddress in maildomain.mailaddresses %}{% spaceless %} {% for mailaddress in maildomain.mailaddresses %}{% spaceless %}
<a href="{% url 'edit_mailaddress' package=hostingpackage.id domain=maildomain.domain pk=mailaddress.id %}" title="{% trans "Edit mail address targets" %}">{{ mailaddress }}</a> <a href="{% url 'edit_mailaddress' package=hostingpackage.id domain=maildomain.domain pk=mailaddress.id %}" title="{% trans "Edit mail address targets" %}">{{ mailaddress }}</a>
<a href="{% url 'delete_mailaddress' package=hostingpackage.id domain=maildomain.domain pk=mailaddress.id %}" title="{% trans "Delete mail address" %}"><i class="glyphicon glyphicon-trash"></i></a> <a href="{% url 'delete_mailaddress' package=hostingpackage.id domain=maildomain.domain pk=mailaddress.id %}" title="{% trans "Delete mail address" %}"><i class="glyphicon glyphicon-trash"></i><span class="sr-only"> {% trans "Delete mail address" %}</span></a>
{% endspaceless %}{% if not forloop.last %}, {% endif %} {% endspaceless %}{% if not forloop.last %}, {% endif %}{% endfor %}
{% endfor %} {% endwith %}
</td>
{% else %}
<td class="text-info">{% trans "None" %}</td>
{% endif %}
{% if domain.domain.website_set.exists %}
<td>
{% with domain=domain.domain %}
{% for website in domain.website_set.all %}{% spaceless %}
{{ website }}
<a href="#" titel="{% trans "Delete website" %}"><i class="glyphicon glyphicon-trash"></i><span class="sr-only"> {% trans "Delete website" %}</span></a>
{% endspaceless %}{% if not forloop.last %}, {% endif %}{% endfor %}
{% endwith %} {% endwith %}
</td> </td>
{% else %} {% else %}
<td class="text-info">{% trans "None" %}</td> <td class="text-info">{% trans "None" %}</td>
{% endif %} {% endif %}
<td></td>
<td> <td>
{% with maildomain=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></a> <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 %}
{% 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 %} {% endwith %}
</td> </td>
</tr> </tr>