{% set container = entity %} {% set entity_view = "browse" %} {% set entity_type = "container" %} {% import "entity_macros.html" as entity_macros %} {% extends "entity_base.html" %} {% macro browse_year_volume_issue_table(entity, data) %} {% for year in data.keys()|sort|reverse %} {% set year_loop = loop %} {% for volume in data[year].keys()|sort|reverse %} {% set volume_loop = loop %} {% for issue in data[year][volume].keys()|sort|reverse %} {% set issue_loop = loop %} {% if volume_loop.first and issue_loop.first %} {% set year_rowspan = data[year].values()|map('length')|sum %} {% endif %} {% if issue_loop.first %} {% endif %} {% endfor %} {% endfor %} {% endfor %}
Year Volume Issue Indexed Content
{{ year }} {% if volume != '000_unknown' %} Vol. {{ volume }} {% endif %} {% if issue != '000_unknown' %} Issue {{ issue }} {% endif %} {{ data[year][volume][issue] }} releases
{% endmacro %} {% macro browse_releases(found) %}

Browsing: {% if request.args.volume %}Volume {{ request.args.volume }}  {% endif %} {% if request.args.issue %}Issue {{ request.args.issue }}  {% endif %} {% if request.args.year %}Year {{ request.args.year }}  {% endif %}


{% for release_doc in found.results %}
{% if request.args.volume %} {% if release_doc.pages %} {{ release_doc.pages }} {% else %} {# blank #} {% endif %} {% elif release_doc.release_date %} {{ release_doc.release_date }} {% endif %}
{{ entity_macros.release_search_result_row(release_doc, margin_top=False) }}
{% endfor %} {% endmacro %} {% block entity_main %} {% if releases_found %} {{ browse_releases(releases_found) }} {% elif entity._browse_volume_year %}

Contents by Year and Volume

{{ browse_year_volume_issue_table(entity, entity._browse_volume_year) }}
{% endif %} {% endblock %}