apostrophe
Version:
The Apostrophe Content Management System.
42 lines (41 loc) • 2.04 kB
HTML
{% if data.job.notfound %}
{# Unlikely in production, but likely in development where dbs get reset #}
<h3 class="apos-job-failed">{{ __ns('apostrophe', 'The job no longer exists') }}</h3>
{% elif data.job.canceling %}
{% if data.job.canCancel %}
<h3 class="apos-job-failed">{{ __ns('apostrophe', data.job.labels.canceling or 'Canceling...') }}</h3>
{% else %}
<h3 class="apos-job-failed">{{ __ns('apostrophe', data.job.labels.stopping or 'Stopping...') }}</h3>
{% endif %}
{% elif data.job.status == 'failed' %}
<h3 class="apos-job-failed">{{ __ns('apostrophe', data.job.labels.failed or 'Failed') }}</h3>
{% elif data.job.status == 'canceled' %}
<h3 class="apos-job-failed">{{ __ns('apostrophe', data.job.labels.canceled or 'Canceled') }}</h3>
{% elif data.job.status == 'stopped' %}
<h3 class="apos-job-failed">{{ __ns('apostrophe', data.job.labels.stopped or 'Stopped') }}</h3>
{% elif data.job.status == 'completed' %}
<h3>{{ __ns('apostrophe', data.job.labels.completed or 'Completed') }}</h3>
{% else %}
<h3>{{ __ns('apostrophe', data.job.labels.running or 'In Progress...') }}</h3>
{% endif %}
{# Different jobs might give us more or less to work with. #}
{# Don't display a table unless we have info on processed items #}
{% if data.job.processed %}
<table class="apos-job-results">
<tr>
<th>{{ __ns('apostrophe', data.job.labels.good or 'Successful') }}</th><td>{{ data.job.good }}</td>
</tr>
<tr class="{{ 'apos-job-errors' if data.job.errors }}">
<th>{{ __ns('apostrophe', data.job.labels.bad or 'Errors') }}</th><td>{{ data.job.bad or 0 }}</td>
</tr>
</table>
{% endif %}
{# Don't display a progress bar unless we can compute it from a known total #}
{% if data.job.total %}
<div class="apos-job-progress" data-apos-progress>
<div class="apos-job-progress-indicator"
data-apos-progress-indicator
style="width: {{ data.job.percentage }}%"></div>
<div class="apos-job-progress-percentage">{{ data.job.percentage }}%</div>
</div>
{% endif %}