add various template blocks

This commit is contained in:
Andreas Zweili 2020-02-16 14:19:35 +01:00
parent b781192138
commit 4ed71e8472
4 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,41 @@
<div class="card">
<div class="content">
<div class="header">Description</div>
<div class="description"><p>{{ device.description }}</p></div>
<table class="ui celled table">
<tr>
<td><b>Serial Number:</b></td>
<td><code>{{ device.serialnumber }}</code></td>
</tr>
<tr>
<td><b>Category:</b></td>
<td>{{ device.category }}</td>
</tr>
<tr>
<td><b>Owner:</b></td>
<td>{{ device.owner }}</td>
</tr>
<tr>
<td><b>Customer:</b></td>
<td><a href="{% url 'customer' device.customer.id %}">{{ device.customer }}</a></td>
</tr>
<tr>
<td><b>Manufacturer:</b></td>
<td>{{ device.manufacturer }}</td>
</tr>
<tr>
<td><b>Model:</b></td>
<td>{{ device.model }}</td>
</tr>
<tr>
<td><b>Location:</b></td>
<td>{{ device.location }}</td>
</tr>
<tr>
<td><b>Installation Date:</b></td>
<td>{{ device.installation_date }}</td>
</tr>
</table>
</div>
</div>

View File

@ -0,0 +1,18 @@
{% if device.ips %}
<div class="card">
<div class="content">
<div class="header">IPs</div>
<table class="ui celled table">
<tr>
<td><b>IPs:</b></td>
<td>
{% for net_id, ip in device.ips.items %}
<a href="{% url 'net' net_id %}">{{ip}}</a><br>
{% endfor %}
</td>
</tr>
</table>
</div>
</div>
{% endif %}

View File

@ -0,0 +1,17 @@
{% if warranty_relations %}
<div class="card">
<div class="content">
<div class="header">Warranty</div>
<table class="ui celled table">
<tr>
<td><b>Warranty:</b></td>
{% for warranty in warranty_relations %}
<td>
{{ warranty.valid_from }}<br>
</td>
{% endfor %}
</tr>
</table>
</div>
</div>
{% endif %}

View File

@ -0,0 +1,9 @@
<div class="header">Licenses</div>
<table class="ui celled table">
{% for license in license_list %}
<tr>
<td>{{ license.license.software }}</td>
<td><code>{{ license.license.key }}</code></td>
</tr>
{% endfor %}
</table>