{% extends "base.html" %} {% load i18n static ui help %} {% comment %} The Files section (#79, #176): every file of the station, grouped. The zip and the report, the summary files, the quality-control files, the plots, the sector comparison, each index (one file group per section) and any other file of the run. Other pages link here instead of listing files (DESIGN.md, "Don't offer downloads everywhere"). Before the indices are calculated it holds the quality-control files alone. Context from views_downloads. {% endcomment %} {% block title %}{% blocktranslate with name=analysis.station_name %}Files: {{ name }}{% endblocktranslate %}{% endblock %} {% block content %}
{% include "stations/_workspace.html" with heading=True %} {% comment %}The Inputs panel beside the section (#198).{% endcomment %}
{% include "stations/_inputs.html" %}

{% translate "All files" %}

{% section_help "files.page" %}

{% if source %}{% translate "Every file of this station. The report is the easiest to read and share." %}{% else %}{% translate "The files of the quality checks. The files of the indices appear here when you calculate them." %}{% endif %}

{% if analysis.expires_at or from_batch %}

{% if analysis.expires_at %}{% blocktranslate with date=analysis.expires_at|date:"j F Y" %}Kept until {{ date }}. The links work until then.{% endblocktranslate %}{% endif %}{% if analysis.expires_at and from_batch %} {% endif %}{% if from_batch %}{% translate "These are this station's files from the batch run." %}{% endif %}

{% endif %}
{% if stale_results or stale_quality %} {% comment %}Out of date after a change (#179): the files stay until they are replaced.{% endcomment %} {% translate "Some files are out of date" as stale_title %} {% if stale_results %}{% translate "The files of the indices are from before your last change. They are replaced when the new results are ready." as stale_note %}{% url 'stations:results' analysis.workspace_id analysis.slug as stale_href %}{% translate "See the results" as stale_label %} {% else %}{% translate "The quality-control files are from before your last change. They are replaced when the new checks are ready." as stale_note %}{% url 'stations:qc' analysis.workspace_id analysis.slug as stale_href %}{% translate "See the checks" as stale_label %}{% endif %} {% include "components/stale_banner.html" with id="files-stale" title=stale_title note=stale_note action_href=stale_href action_label=stale_label %} {% endif %} {% if source %}

{% translate "The whole calculation" %}

  • {% translate "Everything" %}

    {% if main.zip %}

    {{ main.zip.note }}

    {% comment %}Out of date (#223): the old run's zip, secondary, until the new one is ready. R's zip with the provenance file added (stations:station_zip, #239).{% endcomment %} {% url 'stations:station_zip' analysis.workspace_id analysis.slug as zip_url %}{% if stale_results %}{% blocktranslate with size=main.zip.size|filesizeformat asvar zip_label %}Download all (zip, {{ size }}, out of date){% endblocktranslate %}

    {% include "components/button.html" with label=zip_label href=zip_url icon="download" variant="secondary" %}

    {% else %}{% blocktranslate with size=main.zip.size|filesizeformat asvar zip_label %}Download all (zip, {{ size }}){% endblocktranslate %}

    {% include "components/button.html" with label=zip_label href=zip_url icon="download" %}

    {% endif %} {% else %}

    {% translate "Not made. The zip was switched off in the settings." %}

    {% if input_urls.settings %}

    {% translate "Change the index settings" %}

    {% endif %} {% endif %}
  • {% translate "Report" %}

    {% if main.report %}

    {{ main.report.note }}

    {% url 'jobs:file' job.pk main.report.path as report_url %}{% blocktranslate with size=main.report.size|filesizeformat asvar report_label %}Download the report (PDF, {{ size }}){% endblocktranslate %}

    {% include "components/button.html" with label=report_label href=report_url icon="download" variant="secondary" %}

    {% else %}

    {% translate "Not made. The report was switched off, or this calculation is older than the report." %}

    {% if input_urls.settings %}

    {% translate "Change the index settings" %}

    {% endif %} {% endif %}
{% if summary %}

{% translate "Summary files" %}

{% for d in summary %}{% endfor %}
{% translate "Summary files to download" %}
{% translate "File" %}{% translate "Contents" %}{% translate "Download" %}
{{ d.label }}{{ d.note }}{% url 'jobs:file' job.pk d.path as d_href %}{% include "components/download_link.html" with d=d href=d_href %}
{% endif %} {% endif %} {% if quality %}

{% translate "Quality checks" %}

{% translate "What each check found, and the days missing per year, as CSV." %}{% if quality.job != job and source %} {% translate "The zip of the calculation has the same files." %}{% endif %}

{% if quality.zip %}

{% url 'jobs:file' quality.job.pk quality.zip.path as d_href %}{% include "components/download_link.html" with d=quality.zip href=d_href %}

{% endif %} {% if quality.files %}
{% translate "Each check's file" %} {% blocktranslate with size=quality.size|filesizeformat count counter=quality.files|length %}{{ counter }} file, {{ size }}{% plural %}{{ counter }} files, {{ size }}{% endblocktranslate %}{% icon "chevron-down" %}
{% for d in quality.files %}{% endfor %}
{% translate "Check" %}{% translate "File" %}{% translate "Download" %}
{{ d.label }}{{ d.name }}{% url 'jobs:file' quality.job.pk d.path as d_href %}{% include "components/download_link.html" with d=d href=d_href %}
{% endif %} {% if analysis.qc_job %}

{% translate "See what the quality checks found" %}

{% endif %}
{% endif %} {% if source %}

{% translate "Plots" %}

{% if main.all_plots %}

{% url 'jobs:file' job.pk main.all_plots.path as d_href %}{% include "components/download_link.html" with d=main.all_plots href=d_href %} {% translate "All the plots in one PDF." %}

{% else %}

{% translate "Not made. The plots were switched off in the settings." %}

{% endif %}
{% if sector %}

{% translate "Sector comparison" %}

{% if sector.zip %}

{% url 'jobs:file' sector.job.pk sector.zip.path as d_href %}{% include "components/download_link.html" with d=sector.zip href=d_href %}

{% endif %} {% if sector.files %}
{% for d in sector.files %}{% endfor %}
{% translate "Sector comparison files to download" %}
{% translate "File" %}{% translate "Download" %}
{{ d.label }}{% url 'jobs:file' sector.job.pk d.path as d_href %}{% include "components/download_link.html" with d=d href=d_href %}
{% endif %}

{% translate "See the sector comparison" %}

{% endif %}

{% translate "Each index" %}

{% translate "A table (CSV) per index and a plot (PNG) per series." %}{% if not plots_made %} {% translate "The plots were switched off in the settings." %}{% endif %}

{% for section in sections %}
{{ section.label }} {% blocktranslate with size=section.size|filesizeformat count counter=section.cards|length %}{{ counter }} index, {{ size }}{% plural %}{{ counter }} indices, {{ size }}{% endblocktranslate %}{% icon "chevron-down" %}
{% for item in section.cards %}{% for row in item.rows %} {% if forloop.first %}{% endif %} {% endfor %}{% endfor %}
{% translate "Index" %}{% translate "Series" %}{% translate "Table" %}{% translate "Plot" %}
{% include "components/index_name.html" with code=item.card.code name=item.card.title only %}{{ row.series.label }} {{ row.series.name }} {% if row.csv %}{% url 'jobs:file' job.pk row.csv.path as d_href %}{% include "components/download_link.html" with d=row.csv href=d_href %}{% else %}{% translate "in the index's table" %}{% endif %} {% if row.png %}{% url 'jobs:file' job.pk row.png.path as d_href %}{% include "components/download_link.html" with d=row.png href=d_href %}{% else %}{% translate "none" %}{% endif %}
{% endfor %}
{% if others %}

{% translate "Other files" %}

{% translate "The calculation's other files" %} {% blocktranslate count counter=others|length %}{{ counter }} file{% plural %}{{ counter }} files{% endblocktranslate %}{% icon "chevron-down" %}
{% for d in others %}{% endfor %}
{% translate "File" %}{% translate "Download" %}
{{ d.label }}{% url 'jobs:file' job.pk d.path as d_href %}{% include "components/download_link.html" with d=d href=d_href %}
{% endif %}

{% translate "Every file of this calculation, as a list" %}

{% else %}

{% translate "Calculate the indices" %} {% icon "arrow-right" %}

{% endif %}
{% include "stations/_input_sheets.html" %} {% endblock %}