Handle template cleanups
This commit is contained in:
parent
7b8e1c93ab
commit
e6d85236a3
|
@ -0,0 +1,18 @@
|
|||
{% 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>
|
||||
<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>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% include "whoisdb/handle_table.html" with object=object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
|
|
@ -3,15 +3,6 @@
|
|||
{% load handletags %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{{ object }} <small>({{ object.getClassName }})</small></div>
|
||||
<div class="panel-body">
|
||||
{% include "whoisdb/handle_table.html" with object=object %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include "whoisdb/handle_panel.html" with object=object %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
<td>Actions</td>
|
||||
{% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-edit" as editView %}
|
||||
{% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-delete" as deleteView %}
|
||||
<td><a href="{% url editView object.getPK %}">Edit object<a/>, <a href="{% url deleteView object.getPK %}">Delete object</a></td>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
</tr>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<p>
|
||||
You can create new database objects <a href="{% url "whoisdb:createObjectOverview" %}">here</a>.
|
||||
{% if hasDelegations %}
|
||||
See <a href="?delegated=1">also delegated objects</a>.
|
||||
See <a href="?delegated=1">also lir/rir objects</a>.
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
|
|
|
@ -12,19 +12,6 @@
|
|||
<button class="btn btn-primary">Search</button>
|
||||
</form>
|
||||
</p>
|
||||
{% comment %}
|
||||
{% if term %}
|
||||
<p>
|
||||
<h3>Search for '{{ term }}'</h3>
|
||||
{% for obj in results %}
|
||||
<h5>{{ obj }}</h5>
|
||||
{% include "whoisdb/handle_table.html" with object=obj %}
|
||||
{% empty %}
|
||||
No objects found.
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
{% if term and not results %}
|
||||
No objects found.
|
||||
{% endif %}
|
||||
|
@ -36,12 +23,7 @@
|
|||
{% for obj in results %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{{ obj }} <small>({{ obj.getClassName }})</small></div>
|
||||
<div class="panel-body">
|
||||
{% include "whoisdb/handle_table.html" with object=obj %}
|
||||
</div>
|
||||
</div>
|
||||
{% include "whoisdb/handle_panel.html" with object=obj %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue