{% extends "part/part_base.html" %}

{% block details %}

{% include 'part/tabs.html' with tab='track' %}

Part tracking for {{ part.full_name }}

<table class="table table-striped">
<tr>
    <th>Serial</th>
    <th>Status</th>
</tr>
{% for track in part.tracked_parts.all %}
<tr>
    <td><a href="{% url 'track-detail' track.id %}">{{ track.serial }}</a></td>
    <td>{{ track.get_status_display }}</td>
</tr>
{% endfor %}
</table>

<div class='container-fluid'>
<a href="{% url 'track-create' %}?part={{ part.id }}">
    <button class="btn btn-success">New Tracked Part</button>
</a>
</div>

{% endblock %}