dnmgmt/templates/whoisdb/handle_table.html

29 lines
1.2 KiB
HTML
Raw Normal View History

2017-03-27 13:29:32 +02:00
{% load handletags %}
2017-03-28 02:05:30 +02:00
<table class="table table-hover">
2017-03-27 13:29:32 +02:00
{% for field in object|getFields:user %}
<tr>
<td>{{ field.0 }}</td>
2017-03-28 01:56:10 +02:00
<td>{% if field.1.through %}{{ field.1.all|linkObjects|default:"-" }}{% else %}{{ field.1|tryLinkHandle|default:"-" }}{% endif %}</td>
2017-03-27 13:29:32 +02:00
</tr>
{% endfor %}
{% if object|userCanEdit:user %}
<tr>
<td>Actions</td>
2017-03-31 03:26:10 +02:00
{% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-edit" as editView %}
{% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-delete" as deleteView %}
2017-04-15 16:59:37 +02:00
<td>
2017-05-02 03:42:20 +02:00
{% if object.getClassName == "Domain" %}
<a href="{% url "domains:domain-check" object.getZone %}"><span title="Check DNS" class="glyphicon glyphicon-check"></span></a>
{% elif object.getClassName == "ReverseZone" %}
<a href="{% url "domains:reversezone-check" object.getPK %}"><span title="Check DNS" class="glyphicon glyphicon-check"></span></a>
{% endif %}
<a href="{% url editView object.getPK %}"><span title="Edit" class="glyphicon glyphicon-pencil"></span></a>
<a href="{% url deleteView object.getPK %}"><span title="Delete" class="glyphicon glyphicon-trash"></span></a>
2017-04-15 16:59:37 +02:00
</td>
2017-03-27 13:29:32 +02:00
{% endwith %}
{% endwith %}
</tr>
{% endif %}
</table>