{% from 'attachments/_display.html' import render_attachments_folders %} {% from 'events/display/common/_manage_button.html' import render_manage_button %} {% from 'events/display/indico/_common.html' import render_users %} {% macro render_break(break_, timezone) %} {{ break_.timetable_entry.start_dt | format_time(timezone=timezone) }} --- {{ break_.title }} --- {% endmacro %} {% macro render_session_block(block, timezone) %} {% set entries = block.timetable_entry.children %} {{ block.timetable_entry.start_dt | format_time(timezone=timezone) }}
{{ render_manage_button(block, 'SESSION_BLOCK', toggle_notes=false, show_note_operations=true) }} {% if block.has_note %}
{% endif %}
{{- block.session.title }} {% set conveners = block.person_links|list %} {% if conveners %} -{{ render_users(conveners, span_class="speakerList", separator=' ') }} {% endif %} (until {{ block.timetable_entry.end_dt | format_time(timezone=timezone) }}) {% if not block.inherits_location %} ({{ block.room_name }}) {% endif %}
{{ render_attachments_folders(item=block.session) }}
{% for entry in entries|sort(attribute='object.title')|sort(attribute='start_dt') %} {% if entry.type.name == 'CONTRIBUTION' and entry.object.can_access(session.user) %} {{ render_contribution(entry.contribution, timezone, loop.index) }} {% elif entry.type.name == 'BREAK' %} {{ render_break(entry.break_, timezone) }} {% endif %} {% endfor %} {% endmacro %} {% macro render_contribution(contrib, timezone, index) %} {{ contrib.start_dt | format_time(timezone=timezone) }} {{ contrib.title }} {% set speakers = contrib.person_links|selectattr("is_speaker")|list %} {% if speakers %} - {{ render_users(speakers, span_class="speakerList", separator=' ') }} {% endif %}   {% if not contrib.inherits_location %} ({{ contrib.room_name }}) {% endif %}
{{ render_attachments_folders(item=contrib) }}
{{ render_manage_button(contrib, 'CONTRIBUTION', toggle_notes=false, show_note_operations=true) }} {% if contrib.has_note %} {% endif %}
{% endmacro %} {% macro render_entry(entry, timezone, index) %} {% if entry.type.name == 'CONTRIBUTION' -%} {{ render_contribution(entry.object, timezone, index) }} {% elif entry.type.name == 'SESSION_BLOCK' -%} {{ render_session_block(entry.object, timezone) }} {% elif entry.type.name == 'BREAK' -%} {{ render_break(entry.object, timezone) }} {% endif %} {% endmacro %} {% for day, _ in days %} {{ day | format_date(format='medium', timezone=timezone) }}
{% endfor %}
AM
{% for day, entries in days %} {% for entry in entries %} {% if entry.start_dt.astimezone(tz_object).hour < 12 %} {{ render_entry(entry, tz_object, loop.index) }} {% endif %} {% endfor %}
{% endfor %}
PM
{% for day, entries in days %} {% for entry in entries %} {% if entry.start_dt.astimezone(tz_object).hour >= 12 %} {{ render_entry(entry, tz_object, loop.index) }} {% endif %} {% endfor %}
{% endfor %}