{% load static %} {% load evelinks %}

<tr>
    <td class="table-center">
        {{ forloop.counter }}
    </td>

    <td class="table-center">{{ i.station_name }}</td>

    <td class="">
        <div class="activity-description">
            {% if i.is_corp_job %}
                <img title="Corporation Job - {{ i.installer_corp_name }}"
                    src="{{ i.installer_corp|corporation_logo_url }}" />
                &nbsp;
                <img title="Corporation Job - {{ i.installer_name }}"
                    src="{{  i.installer_id|character_portrait_url }}" />

            {% endif %}

            <span style="margin-left: 5px">{{ i.activity_id }}</span>
        </div>
    </td>

    <td class="">
        <div class="blueprint-cell">
            <img src="https://image.eveonline.com/Type/{{ i.blueprint_id }}_32.png"
                title="{{ i.blueprint_name }}">
            <span style="margin-left: 5px">{{ i.blueprint_name }}</span>
        </div>
    </td>

    <td class="table-center">
        <div class="progress table-vertical-align" style="height: 35px; width: 150px">
            {% if i.status == 'active' %}
            <div id="progress_{{ i.job_id }}"
                 class="progress-bar progress-bar-success progress-bar-striped active"
                 role="progressbar" aria-valuenow="70"
                 aria-valuemin="0" aria-valuemax="100">
                    <div class="progress-bar-custom">0%</div>
            </div>
            {% else %}
            <div id="progress_{{ i.job_id }}"
                 class="progress-bar progress-bar-danger progress-bar-striped"
                 role="progressbar" aria-valuenow="100"
                 aria-valuemin="0" aria-valuemax="100">
                    <div class="progress-bar-custom">100%</div>
            </div>
            {% endif %}
        </div>
    </td>

    {% if i.status == 'active' %}
        <td class="table-center" id="remaining_{{ i.job_id }}">
    {% else %}
        <td class="table-center" id="remaining">
    {% endif %}

        </td>

    <td class="table-center">{{ i.duration }}</td>

    <td class="table-center" id="start_date_{{ i.job_id }}">
        {{ i.start_date | date:"Y-m-d H:i" }}
    </td>
    <td class="table-center" id="end_date_{{ i.job_id }}">
        {{ i.end_date |date:"Y-m-d H:i" }}
    </td>
    <input type="hidden" name="timeleft" value="{{ i.job_id }}" />
</tr>
