{% extends "base.html" %} {% block title %}{{ t("import_history.title") }} - IssueDeck{% endblock %} {% block content %}

{{ t("import_history.title") }}

{{ t("import_history.description") }}

{{ t("common.reset") }}
{% if deleted_count is not none %}
{{ t("import_history.delete_success", count=deleted_count) }}
{% elif restored_count is not none %}
{{ t("import_history.restore_success", count=restored_count) }}
{% elif delete_empty %}
{{ t("import_history.delete_empty") }}
{% elif restore_empty %}
{{ t("import_history.restore_empty") }}
{% elif delete_missing %}
{{ t("import_history.delete_missing") }}
{% elif restore_missing %}
{{ t("import_history.restore_missing") }}
{% endif %} {% if batches %}
{% for batch in batches %} {% set has_active_items = batch.active_items > 0 %} {% set has_deleted_items = batch.deleted_items > 0 %}
{{ t("import_history.source_" ~ batch.source_type) }} {{ batch.created_at }}

{{ batch.source_name }}

{{ t("import_history.batch_tag") }}: {{ batch.batch_tag }}

{{ t("import_history.triage_batch") }}
{% for label_key, value in [ ("import_history.planned", batch.items_planned), ("import_history.written", batch.items_written), ("import_history.active_items", batch.active_items), ("import_history.deleted_items", batch.deleted_items), ("import_history.skipped", batch.skipped_count), ("import_history.status_mapped", batch.status_mapped), ("import_history.external_links", batch.external_links) ] %}
{{ t(label_key) }}
{{ value }}
{% endfor %}
{% endfor %}

{{ t("import_history.pagination_summary", start=page_start, end=page_end, total=total_matches) }}

{% if previous_page_url %} {{ t("common.previous") }} {% else %} {{ t("common.previous") }} {% endif %} {% if next_page_url %} {{ t("common.next") }} {% else %} {{ t("common.next") }} {% endif %}
{% else %}

{{ t("import_history.empty_title") }}

{{ t("import_history.empty_body") }}

{% endif %}
{% endblock %}