dnmgmt/templates/whoisdb/handle_panel.html

41 lines
1.3 KiB
HTML
Raw Permalink Normal View History

{% load handletags %}
2017-04-15 16:59:37 +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 %}
<div class="panel panel-default">
<div class="panel-heading">
{{ object }} <small>({{ object.getClassName }})</small>
{% if object|userCanEdit:request.user %}
2017-04-15 16:59:37 +02:00
<span class="pull-right">
<a href="{% url editView object.getPK %}"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="{% url deleteView object.getPK %}"><span class="glyphicon glyphicon-trash"></span></a>
</span>
{% endif %}
2017-04-15 16:59:37 +02:00
</div>
<div class="panel-body">
{% include "whoisdb/handle_table.html" with object=object %}
{% if showRelated %}
{% comment %}Show related objects{% endcomment %}
{% if object.getClassName == "ASNumber" %}
{% if object.inetnum_set.all %}
<h5>Networks originating from this AS</h5>
<ul>
{% for net in object.inetnum_set.all %}
<li><a href="{% url "whoisdb:showhandle" net.handle %}">{{ net }} ({{ net.prefix }})</a></li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% endif %}
2017-04-15 16:59:37 +02:00
</div>
</div>
{% endwith %}
{% endwith %}