1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

41 lines
1.6 KiB
HTML

{% load helpers %}
<tr>
{# Checkbox #}
{% if perms.dcim.change_inventoryitem or perms.dcim.delete_inventoryitem %}
<td class="pk">
<input name="pk" type="checkbox" value="{{ item.pk }}" />
</td>
{% endif %}
<td style="padding-left: {{ item.level }}0px">
<a href="{{ item.get_absolute_url }}">{{ item }}</a>
</td>
<td>
{% if item.manufacturer %}
<a href="{{ item.manufacturer.get_absolute_url }}">{{ item.manufacturer }}</a>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
<td>{{ item.part_id|placeholder }}</td>
<td>{{ item.serial|placeholder }}</td>
<td>{{ item.asset_tag|placeholder }}</td>
<td>
{% if item.discovered %}
<span class="text-success"><i class="fa fa-check"></i></span>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
<td>{{ item.description|placeholder }}</td>
<td class="text-right noprint">
{% if perms.dcim.change_inventoryitem %}
<a href="{% url 'dcim:inventoryitem_edit' pk=item.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-xs btn-warning"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
{% endif %}
{% if perms.dcim.delete_inventoryitem %}
<a href="{% url 'dcim:inventoryitem_delete' pk=item.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
{% endif %}
</td>
</tr>