{% if pendingUrlDownloads|length > 0 %}

{{ t('pending_transfers', 'Pending Transfers') }}:

{% for pendingUrlDownload in pendingUrlDownloads %} {% set downloadSpeed = 0 %} {% if pendingUrlDownload['job_status'] == 'downloading' and pendingUrlDownload['startedAgo'] > 0 %} {% set downloadSpeed = (pendingUrlDownload['downloaded_size'] / pendingUrlDownload['startedAgo'])|number_format(2, '.', ',') %} {% endif %} {% set icon = 'processing_small.gif' %} {% if pendingUrlDownload['job_status'] == 'complete' %} {% set icon = 'green_tick_small.png' %} {% elseif pendingUrlDownload['job_status'] == 'cancelled' %} {% set icon = 'red_error_small.png' %} {% elseif pendingUrlDownload['job_status'] == 'failed' %} {% set icon = 'red_error_small.png' %} {% endif %} {% endfor %}
{{ t('url', 'url')|title }} {{ t('progress', 'progress')|title }} {{ t('status', 'status')|title }}
{{ pendingUrlDownload['job_status']|title }} {{ pendingUrlDownload['url'] }} {% if pendingUrlDownload['total_size'] > 0 %} ({{ pendingUrlDownload['downloaded_size']|number_format(2, '.', ',') }}){% endif %} {% if pendingUrlDownload['notes']|length > 0 %}
{{ pendingUrlDownload['notes'] }} {% else %} {% if pendingUrlDownload['new_file_id'] > 0 %}
{{ t('download', 'Download')|title }}: {{ pendingUrlDownload['file_original_filename'] }} {% endif %} {% endif %}
{% if pendingUrlDownload['job_status'] == 'cancelled' or pendingUrlDownload['job_status'] == 'failed' %}-{% else %} {{ pendingUrlDownload['download_percent']|number_format(2, '.', ',') }}% {% if downloadSpeed > 0 %}
{{ CoreHelper.formatSize(downloadSpeed) }}s {% endif %} {% endif %}
{{ pendingUrlDownload['job_status']|title }}
{% if pendingUrlDownload['job_status'] == 'pending' %} ({{ t('cancel', 'cancel') }}) {% elseif pendingUrlDownload['job_status'] == 'downloading' %} ({{ t('cancel', 'cancel') }}) {% elseif pendingUrlDownload['job_status'] == 'cancelled' %} ({{ t('remove', 'remove') }}) {% elseif pendingUrlDownload['job_status'] == 'complete' or pendingUrlDownload['job_status'] == 'failed' %} ({{ t('clear', 'clear') }}) {% endif %}
{% endif %}