{% extends "base.html" %} {% from "_icons.html" import icon %} {% block title %}{{ job.title }} ยท {{ t('common.app') }}{% endblock %} {% block main %} {#- The job page of the jobs that are not an audiobook (#391): the voice download, a preview, an analysis, the whole audiobook built as one file (#725). An audiobook job is shown on its document's Prepare page. -#}

{{ job.title }}

{{ t('job.state') }}: {{ t('job.state_' + job.state) }}

{% if job.state == 'running' %}

{{ t('job.progress') }}

{# the job page's buttons are drawn disabled; app.js enables each with its click (#177) #} {% if job.cancellable %}

{% endif %} {% endif %}

{% if job.state == 'done' and job.kind == 'preview' %}

{{ t('js.preview_ready') }}

{% for file in job.files %}{% endfor %} {% endif %} {% if job.state == 'done' and job.kind == 'voices' %}

{{ t('setup.installed') }}

{% endif %} {% if job.state == 'done' and job.kind == 'book' %}

{{ t('book.ready') }}

{% if job.progress.partial %}

{{ t('book.partial_note') }}

{% endif %} {% for file in job.files %}

{{ icon('download', 's') }}{{ t('job.download', name=file.name, size=size_text(file.size)) }}

{{ t('book.folder', folder=file.folder) }}

{% endfor %} {% endif %} {% if job.state == 'failed' %}

{{ t('job.failed', reason=job.failure.reason) }}

{% if job.failure.details %}

{{ t('common.details') }} {{ job.failure.details }}

{% endif %} {% endif %} {% if job.state == 'cancelled' %}

{{ t('job.cancelled') }}

{% endif %} {% if document and job.kind == 'book' %}

{{ t('book.back') }}

{% elif document %}

{{ t('job.back') }}

{% endif %}
{% endblock %}