{% extends "layout/base.html" %} {# If a user chooses these fields, they carry between different pages. #} {% set product_args = { 'product_name': product.name, 'year': year, 'month': month, 'day': day } %} {% set additional_page_args=additional_page_args or {} %} {% set product_args_label -%} {%- if year -%} {%- if not day %} across {%- else %} on {%- endif -%} {%- if month -%} {%- if day %} {{ day | day_ordinal}} {%- endif %} {{ month | month_name }} {%- endif %} {{ year }} {%- else %} whole collection {%- endif -%} {%- endset %} {% set back_to_product_overview %}
Return to {{ product.name }} {{ product_args_label }} overview
{% endset %} {% block title -%} {{ product.name }} {{ product_args_label }} {%- endblock %} {% block header %}
{# Go to current page with different product/year/month options#} {% set nav_endpoint=request.url_rule.endpoint %}

{% if product.definition.description %} {{ product.name }}: {{ product.definition.description}} {% else %} {{ product.name }} {% endif %}

{% for row in grouped_products | batch(3) %}
    {% for group_name, product_summaries in row %}
  • {# We leave a space character in blank headings for consistent line height. #}

    {{ group_name or (' '|safe)}}

      {% for product_opt, summary in product_summaries %} {% if product_opt.name not in hidden_product_list %}
    • {{ product_opt.name }}
    • {% endif %} {% endfor %}
  • {% endfor %}
{% endfor %}
{% if product %}

{{ year or 'All years' }}

{% set year_range=[] %} {% if year_selector_summary and year_selector_summary.timeline_dataset_counts %} {% for dataset_date, dataset_count in year_selector_summary.timeline_dataset_counts.items() %} {% if dataset_count > 0 %} {% do year_range.append(dataset_date.year) %} {% endif %} {% endfor %} {% endif %} {% for row in year_range | unique | batch(3) %} {% endfor %}
{% endif %} {% if year %}

{% if month %} {{ month | month_name }} {% else %} All months {% endif %}

{% set month_range=[] %} {% if time_selector_summary and time_selector_summary.timeline_dataset_counts%} {% for time_selector_dataset_date, time_selector_dataset_count in time_selector_summary.timeline_dataset_counts.items() %} {% if time_selector_dataset_count > 0 and time_selector_dataset_date.year == year %} {% do month_range.append(time_selector_dataset_date.month) %} {% endif %} {% endfor %} {% endif %} {% for row in month_range |unique| batch(3) %} {% endfor %}
{% endif %} {% if month %}

{% if day %} {{ day | day_ordinal }} {% else %} All days {% endif %}

{% set day_range=[] %} {% if time_selector_summary and time_selector_summary.timeline_dataset_counts%} {% for time_selector_dataset_date, time_selector_dataset_count in time_selector_summary.timeline_dataset_counts.items() %} {% if time_selector_dataset_count > 0 and time_selector_dataset_date.year == year and time_selector_dataset_date.month == month %} {% do day_range.append(time_selector_dataset_date.day) %} {% endif %} {% endfor %} {% endif %} {% for row in day_range | unique | batch(3) %} {% endfor %}
{% endif %}
{% endblock %}