reformat the computer list to a table instead of a list
This commit is contained in:
parent
5f00b2de26
commit
ffa545110b
|
@ -539,16 +539,25 @@ information.
|
|||
{% extends "inventory/base.html" %}
|
||||
{% block content %}
|
||||
{% if device_list or computer_list %}
|
||||
<h3>Device List</h3>
|
||||
<ul>
|
||||
{% for device in device_list %}
|
||||
<li><a href="{% url 'device' device.id %}">{{ device.name }}</a></li>
|
||||
{% endfor %}
|
||||
{% for computer in computer_list %}
|
||||
<li><a href="{% url 'computer' computer.id %}">{{ computer.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>No devices are available.</p>
|
||||
<h3>Computer List</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Hostname</th>
|
||||
<th>IP</th>
|
||||
</tr>
|
||||
{% for computer in computer_list %}
|
||||
<tr>
|
||||
<td><a href="{% url 'computer' computer.id %}">{{ computer.name }}</a></td>
|
||||
<td>{{ computer.ip }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
#+END_SRC
|
||||
|
|
|
@ -1,15 +1,24 @@
|
|||
{% extends "inventory/base.html" %}
|
||||
{% block content %}
|
||||
{% if device_list or computer_list %}
|
||||
<h3>Device List</h3>
|
||||
<ul>
|
||||
{% for device in device_list %}
|
||||
<li><a href="{% url 'device' device.id %}">{{ device.name }}</a></li>
|
||||
{% endfor %}
|
||||
{% for computer in computer_list %}
|
||||
<li><a href="{% url 'computer' computer.id %}">{{ computer.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>No devices are available.</p>
|
||||
<h3>Computer List</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Hostname</th>
|
||||
<th>IP</th>
|
||||
</tr>
|
||||
{% for computer in computer_list %}
|
||||
<tr>
|
||||
<td><a href="{% url 'computer' computer.id %}">{{ computer.name }}</a></td>
|
||||
<td>{{ computer.ip }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue