{% extends 'series-layout.html' %} {% from 'macros.html' import pagination %} {% macro visualize_sorting(sort_field, sort_direction, field) %} {% if sort_field == field %} {% if sort_direction == 'asc' %} {% set other_direction = 'desc' %} {% else %} {% set other_direction = 'asc' %} {% endif %} {{ caller() }} {% if sort_direction == 'desc' %} {% else %} {% endif %} {% else %} {{ caller() }} {% if sort_direction == 'desc' %} {% else %} {% endif %} {% endif %} {% endmacro %} {% block menu %} {{ series_menu('Event frames') }} {% endblock %} {% block series_title %}

Event frames

{% endblock %} {% block series_action %} {% endblock %} {% block series_content %}
{% for type in event_frame_types %} {% endfor %}
{% if event_frames %} {{ pagination( paging, url_for('.event_frames_details', seriesid=series.series_id, selectedtypes=event_frame_types, startDate=start_date, endDate=end_date, page=paging.page-1, sort=sort_field, direction=sort_direction, blockevaluationid=block_evaluation.db_id), url_for('.event_frames_details', seriesid=series.series_id, selectedtypes=event_frame_types, startDate=start_date, endDate=end_date, page=paging.page+1, sort=sort_field, direction=sort_direction, blockevaluationid=block_evaluation.db_id) ) }} {% for frame in event_frames %} {% if frame.end_date is not none %} {% else %} {% endif %} {% endfor %}
{% call visualize_sorting(sort_field, sort_direction, 'type') %} Event frame type {% endcall %} {% call visualize_sorting(sort_field, sort_direction, 'start_date') %} Start date {% endcall %} {% call visualize_sorting(sort_field, sort_direction, 'end_date') %} End date {% endcall %} {% call visualize_sorting(sort_field, sort_direction, 'duration') %} Duration {% endcall %} Action
{{ frame.type }} {{ frame.start_date|datetimeformat }}{{ frame.end_date|datetimeformat }} {{ (frame.end_date - frame.start_date)|timedeltaformat }}- -
{% if frame.end_date is not none %} {% endif %}
{{ pagination( paging, url_for('.event_frames_details', fseriesid=series.series_id, selectedtypes=event_frame_types, startDate=start_date, endDate=end_date, page=paging.page-1, sort=sort_field, direction=sort_direction, blockevaluationid=block_evaluation.db_id), url_for('.event_frames_details', seriesid=series.series_id, selectedtypes=event_frame_types, startDate=start_date, endDate=end_date, page=paging.page+1, sort=sort_field, direction=sort_direction, blockevaluationid=block_evaluation.db_id) ) }} {% else %}
No event frames available in this time frame.
{% endif %} {% endblock %}}