{% extends "admin/layout.html" %}
{% block title %}{{ _("Import") }}{% endblock %}
{% block contents %}
  <h1>{{ _("Import") }}</h1>
  <p>{% trans %}
    If you have posts or comments in another system, Zine can import those
    into this blog.  The data imported doesn't directly end up in the blog but a
    queue so that you can pick which data you want to import.  To get started,
    choose a system to import from below:
  {% endtrans %}</p>
  <ul>
  {%- for importer in importers %}
    <li><a href="{{ url_for(importer) }}">{{ importer.title|e }}</a></li>
  {%- endfor %}
  </ul>
  {%- if queue %}
    <p>{% trans %}
      The following list lists all the imports that are not yet in the database
      or deleted.  Click on one of the links to inspect the imported data and
      select what you want to have in the database.
    {% endtrans %}</p>
    <table>
      <tr>
        <th>{{ _('Date') }}</th>
        <th>{{ _('Title') }}</th>
        <th>{{ _('Importer Used') }}</th>
      </tr>
      {%- for item in queue %}
      <tr class="{{ loop.cycle('odd', 'even') }}">
        <td>{{ item.dump_date|datetimeformat|e }}</td>
        <td><a href="{{ url_for('admin/inspect_import', id=item.id) }}">{{
          item.title|e }}</a></td>
        <td>{{ item.importer }}</td>
      </tr>
      {%- endfor %}
    </table>
  {%- endif %}
{% endblock %}
