{% extends "allianceauth/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}

{% block page_title %}Fittings - FleetUp{% endblock page_title %}

{% block content %}
<div class="col-lg-12">
{% include "fleetup/menu.html" %}
<div class="panel">
    {% if fitting_list %}
        <table class="table table-condensed table-hover table-striped">
            <tr>
                <th class="col-md-1"></th>
                <th class="col-md-1">{% trans "Name" %}</th>
                <th class="col-md-1">{% trans "Hull" %}</th>
                <th class="col-md-1">{% trans "Ship type" %}</th>
                <th class="col-md-1">{% trans "Estimated ISK" %}</th>
                <th class="col-md-2">{% trans "Categories" %}</th>
            </tr>
        {% for id, fittings in fitting_list %}

            <tr>
                <td>
                    <a href="{% url 'fleetup:fitting' fittings.fitting_id %}"><img src="https://image.eveonline.com/InventoryType/{{ fittings.icon_id }}_32.png"></a>
                </td>
                <td>
                    {{ fittings.name }}
                </td>
                <td>
                    {{ fittings.hull }}
                </td>
                <td>
                    {{ fittings.shiptype }}
                </td>
                <td>
                     {% load humanize %}{{ fittings.estimated|intword }}
                </td>
                <td>
                {% for categories in fittings.categories %}
                    {{ categories }},
                {% endfor %}
                </td>
            </tr>

        {% endfor %}
        </table>
        {% else %}
        <h3>{% trans "There seems to be no Fittings in here at the moment!" %}</h3>
    {% endif %}
</div>
</div>

{% endblock content %}
