{% set multivariate_title = 'Event frames' %}
{% extends 'multivariate-layout.html' %}

{% block menu %}
{{ multivariate_menu(multivariate_title) }}
{% endblock %}

{% block multivariate_content %}

{% if multivariate_event_frame_count %}
<h3>Multivariate event frames</h3>
<table class="ts-table table table-borderless score-table">
    <thead class="thead-secondary">
        <tr class="border-top border-bottom">
            <th scope="col">Event frame type</th>
            <th scope="col" class="score">Count</th>
        </tr>
    </thead>
    <tbody>
        {% for frame_type, type_count in multivariate_event_frame_count %}
        <tr class="border-bottom">
            <td>
                <a class="ts-table-link text-decoration-none text-dark" href="{{ url_for('.show_event_frames', blockevaluationid=block_evaluation.db_id, type=frame_type, sourcename=source_name) }}">
                    {{ frame_type }}
                </a>
            </td>
            <td>{{ type_count }}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endif %}

{% if bivariate_event_frame_count %}
<h3>Bivariate event frames</h3>
<table class="ts-table table table-borderless score-table">
    <thead class="thead-secondary">
        <tr class="border-top border-bottom">
            <th scope="col">Event frame type</th>
            <th scope="col" class="score">Count</th>
        </tr>
    </thead>
    <tbody>
        {% for frame_type, type_count in bivariate_event_frame_count %}
        <tr class="border-bottom">
            <td>
                <a class="ts-table-link text-decoration-none text-dark" href="{{ url_for('.show_all_bivariate_event_frames', blockevaluationid=block_evaluation.db_id, type=frame_type, sourcename=source_name) }}">
                    {{ frame_type }}
                </a>
            </td>
            <td>{{ type_count }}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endif %}

{% endblock %}
