<tr>
    <td style="padding-left: {{ indent|add:5 }}px">{{ item.name }}</td>
    <td>{% if not item.discovered %}<i class="fa fa-asterisk" title="Manually created"></i>{% endif %}</td>
    <td>{{ item.manufacturer|default:"" }}</td>
    <td>{{ item.part_id }}</td>
    <td>{{ item.serial }}</td>
    <td>{{ item.asset_tag|default:"" }}</td>
    <td>{{ item.description }}</td>
    <td class="text-right">
        {% if perms.dcim.change_inventoryitem %}
            <a href="{% url 'dcim:inventoryitem_edit' pk=item.pk %}" 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={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
        {% endif %}
    </td>
</tr>
{% for item in item.child_items.all %}
    {% with template_name='dcim/inc/inventoryitem.html' indent=indent|add:20 %}
        {% include template_name %}
    {% endwith %}
{% endfor %}
