{% load i18n %}
{% load humanize %}
{% load moonmining %}

<div class="row">
    <div class="col-md-6">
        {% include 'moonmining/partials/extraction_details_head_base.html' %}
    </div>

    <div class="col-md-6">
        <dl class="dl-horizontal">
            <dt>{% translate 'Status:' %}</dt>
            <dd>{{ extraction.status_enum.bootstrap_tag_html }}</dd>

            <dt>{% translate 'Started:' %}</dt>
            <dd>
                <span title="{{ extraction.started_at|naturaltime }}">
                    {{ extraction.started_at|datetime }}
                </span>
                    by {{ extraction.started_by|default:"?" }}
            </dd>

            {% if extraction.status == extraction.Status.CANCELED %}
                <dt>{% translate 'Canceled:' %}</dt>
                <dd>
                    <span title="{{ extraction.canceled_at|naturaltime|default:'?' }}">
                        {{ extraction.canceled_at|datetime|default:"?" }}
                    </span> by {{ extraction.canceled_by|default:"?" }}
                </dd>
            {% endif %}

            <dt>{% translate 'Chunk arrival:' %}</dt>
            <dd>
                {% if extraction.status == extraction.Status.CANCELED %}<s>{% endif %}
                <span title="{{ extraction.chunk_arrival_at|naturaltime }}">
                    {{ extraction.chunk_arrival_at|datetime }}
                </span>
                {% if extraction.status == extraction.Status.CANCELED %}</s>{% endif %}
            </dd>

            <dt>{% translate 'Auto Fracture:' %}</dt>
            <dd>
                {% if extraction.status == extraction.Status.CANCELED %}<s>{% endif %}
                <span title="{{ extraction.auto_fracture_at|naturaltime }}">
                    {{ extraction.auto_fracture_at|datetime }}
                </span>
                {% if extraction.status == extraction.Status.CANCELED %}</s>{% endif %}
            </dd>

            <dt>{% translate 'Duration:' %}</dt>
            <dd>
                {% blocktranslate with duration_days=extraction.duration_in_days|floatformat %}{{ duration_days }} days{% endblocktranslate %}
            </dd>
        </dl>
    </div>
</div>
