simplify host overview even more, move deletion to host view

This commit is contained in:
Thomas Waldmann 2013-10-27 12:46:44 +01:00
parent 0761f27e32
commit 6a5e67cb9e
2 changed files with 8 additions and 5 deletions

View File

@ -13,6 +13,13 @@
{{ form|bootstrap }} {{ form|bootstrap }}
<button type="submit" class="btn btn-primary">Update</button> <button type="submit" class="btn btn-primary">Update</button>
</form> </form>
<h3>Delete Host</h3>
<p>
Deleting a host is not undoable. If you need it back, you'll have to add it again and configure a new update secret.
</p>
<form method="get" action="{% url 'delete_host' host.pk %}">
<button type="submit" class="btn btn-primary">Delete host {{ host.get_fqdn }}</button>
</form>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<h3>Generate New Secret</h3> <h3>Generate New Secret</h3>

View File

@ -6,7 +6,7 @@
<div class="col-lg-12"> <div class="col-lg-12">
<h3>Your Hosts</h3> <h3>Your Hosts</h3>
<table class="table"> <table class="table">
<tr><th>Host</th><th>Last IP Update</th><th>IPv4 Address</th><th>IPv6 Address</th><th>Comment</th><th>Action</th></tr> <tr><th>Host</th><th>Last IP Update</th><th>IPv4 Address</th><th>IPv6 Address</th><th>Comment</th></tr>
{% for host in hosts %} {% for host in hosts %}
<tr> <tr>
<td><a href="{% url 'host_view' host.pk %}"><b>{{ host.subdomain }}.{{ host.domain.domain }}</b></a></td> <td><a href="{% url 'host_view' host.pk %}"><b>{{ host.subdomain }}.{{ host.domain.domain }}</b></a></td>
@ -14,10 +14,6 @@
<td>{{ host.getIPv4 }}</td> <td>{{ host.getIPv4 }}</td>
<td>{{ host.getIPv6 }}</td> <td>{{ host.getIPv6 }}</td>
<td>{{ host.comment }}</td> <td>{{ host.comment }}</td>
<td>
<a href="{% url 'host_view' host.pk %}"><i class="icon icon-pencil"></i> edit</a> |
<a href="{% url 'delete_host' host.pk %}"><i class="icon icon-remove"></i> delete</a>
</td>
</tr> </tr>
{% empty %} {% empty %}
<tr>No hosts yet.</tr> <tr>No hosts yet.</tr>