{% load i18n %}

<ul class='list-group'>

    <li class='list-group-item'>
        <a href='#' id='item-menu-toggle'>
            <span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
        </a>
    </li>

    <li class='list-group-item {% if tab == "tracking" %}active{% endif %}' title='{% trans "Stock Item Tracking" %}'>
        <a href='{% url "stock-item-detail" item.id %}'>
            <span class='fas fa-history'></span>
            {% trans "History" %}
        </a>
    </li>

    {% if item.part.trackable %}
    <li class='list-group-item {% if tab == "tests" %}active{% endif %}' title='{% trans "Test Data" %}'>
        <a href='{% url "stock-item-test-results" item.id %}'>
            <span class='fas fa-vial'></span>
            {% trans "Test Data" %}
        </a>
    </li>

    {% if item.part.assembly %}
    <li class='list-group-item {% if tab == "installed" %}active{% endif %}' title='{% trans "Installed Stock Items" %}'>
        <a href='{% url "stock-item-installed" item.id %}'>
            <span class='fas fa-sign-in-alt'></span>
            {% trans "Installed Items" %}
        </a>
    </li>
    {% endif %}
    
    {% endif %}

    {% if item.child_count > 0 %}
    <li class='list-group-item {% if tab == "children" %}active{% endif %}' title='{% trans "Child Items" %}'>
        <a href='{% url "stock-item-children" item.id %}'>
            <span class='fas fa-sitemap'></span>
            {% trans "Children" %}
        </a>
    </li>
    {% endif %}


    <li class='list-group-item {% if tab == "attachments" %}active{% endif %}' title='{% trans "Attachments" %}'>
        <a href='{% url "stock-item-attachments" item.id %}'>
            <span class='fas fa-paperclip'></span>
            {% trans "Attachments" %}
        </a>
    </li>

    <li class='list-group-item {% if tab == "notes" %}active{% endif %}' title='{% trans "Stock Item Notes" %}'>
        <a href='{% url "stock-item-notes" item.id %}'>
            <span class='fas fa-clipboard'></span>
            {% trans "Notes" %}
        </a>
    </li>

</ul>