{% extends 'base.html' %}

{% load staticfiles %}

{% block title %}
<link rel="stylesheet" type="text/css" href="{% static 'bom/style.css' %}" />
{{ organization }}'s Parts List
{% endblock %}

{% block menu %}
<li><a href="{% url 'create-part' %}">New Part</a></li>
<li><a href="{% url 'upload-parts' %}">Upload Parts</a></li>
<li><a href="{% url 'export-part-list' %}">Export</a></li>
{% endblock%}

{% block content %}
<ul>
<table class="highlight part-list">
    <thead>
        <tr>
            <th class="tight text-normal">Part Number</th>
            <th class="tight text-normal">Description</th> 
            <th class="tight text-normal">Revision</th>
            <th class="tight text-normal">Manufacturer</th>
            <th class="tight text-normal">MPN</th>
        </tr>
    </thead>
    <tbody>
        {% for part in parts %}
        <tr>
            <td class="tight text-normal"><a href="{% url 'part-info' part_id=part.id %}">{{ part.full_part_number }}</a></td>
            <td class="tight text-normal">{{ part.description }}</td>
            <td class="tight text-normal">{{ part.revision }}</td>
            <td class="tight text-normal">{{ part.manufacturer.name }}</td>
            <td class="tight text-normal">{{ part.manufacturer_part_number }}</td>
        </tr>
        {% endfor %}
    </tbody>
</ul>
{% endblock %}