speech_index.html 3.1 KB
Newer Older
YSelf Tool's avatar
YSelf Tool committed
1 2 3 4
{% extends "layout.html" %}
{% from "macros.html" import render_form %}
{% block title %}Statements{% endblock %}

Robin Sonnabend's avatar
Robin Sonnabend committed
5 6 7 8 9
{% block additional_js %}
<script src="{{ url_for('static', filename='js/nextbutton.js') }}" async></script>
{% endblock %}

{% block additional_sidelinks %}
10
<a href="#" class="mdl-navigation__link" onclick="setkeyhash()"><i class="mdl-colo-text--blue-grey-400 material-icons" role="presentation">keyboard</i>Set Next Key</a>
Robin Sonnabend's avatar
Robin Sonnabend committed
11 12
{% endblock %}

YSelf Tool's avatar
YSelf Tool committed
13
{% block content %}
Hinrikus Wolf's avatar
Hinrikus Wolf committed
14
    {% for statements, add_form, topic in meta %}
Robin Sonnabend's avatar
Robin Sonnabend committed
15
        <table id="next-speaker-table" class="mdl-data-table mdl-js-table mdl-shadow--2dp mdl-cell mdl-cell--6-col mdl-cell--4-col-tablet mdl-cell--4-col-phone sortable">
YSelf Tool's avatar
YSelf Tool committed
16 17 18
            <thead>
                <tr>
                    <th class="mdl-data-table__cell--non-numeric">Speaker</th>
Hinrikus Wolf's avatar
Hinrikus Wolf committed
19
                    {% if (mode is not none and mode == "balanced") or (mode is none and topic.mode == "balanced") %}
YSelf Tool's avatar
YSelf Tool committed
20
                    <th>Count</th>
21
                    {% endif %}
YSelf Tool's avatar
YSelf Tool committed
22 23 24 25 26 27 28 29 30 31 32 33
                    {% if "user" in current_user.roles %}
                    <th class="mdl-data-table__cell--non-numeric">Done</th>
                    <th class="mdl-data-table__cell--non-numeric">Cancel</th>
                    {% endif %}
                </tr>
            </thead>
            <tbody>
            {% for statement, speaker, count in statements %}
                <tr>
                    <td class="mdl-data-table__cell--non-numeric">
                        <h5>{{ speaker.name }}</h5>
                    </td>
Hinrikus Wolf's avatar
Hinrikus Wolf committed
34
                    {% if (mode is not none and mode == "balanced") or (mode is none and topic.mode == "balanced") %}
YSelf Tool's avatar
YSelf Tool committed
35 36 37
                    <td>
                        <h5>{{ count }}</h5>
                    </td>
38
                    {% endif %}
YSelf Tool's avatar
YSelf Tool committed
39 40
                    {% if "user" in current_user.roles %}
                    <td class="mdl-data-table__cell--non-numeric">
Hinrikus Wolf's avatar
Hinrikus Wolf committed
41
                        <a href="{{ url_for(".done", statement=statement.id, next=".index", topic=event_id) }}">
YSelf Tool's avatar
YSelf Tool committed
42 43 44 45 46 47
                            <button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored">
                                <i class="material-icons">done</i>
                            </button>
                        </a>
                    </td>
                    <td class="mdl-data-table__cell--non-numeric">
Hinrikus Wolf's avatar
Hinrikus Wolf committed
48
                        <a href="{{ url_for(".cancel", statement=statement.id, next=".index", topic=event_id) }}">
YSelf Tool's avatar
YSelf Tool committed
49 50 51 52 53 54 55 56 57 58
                            <button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab">
                                <i class="material-icons">delete</i>
                            </button>
                        </a>
                    </td>
                    {% endif %}
                </tr>
            {% endfor %}
            </tbody>
        </table>
59 60
        {% if current_user.is_authenticated and "user" in current_user.roles %}
            {{ render_form(add_form, action_url=url_for('.add', next=".index", event=event_id), action_text="Add", title="Add Speaker to {}".format(event.name)) }}
YSelf Tool's avatar
YSelf Tool committed
61 62
        {% endif %}
    {% endfor %}
YSelf Tool's avatar
YSelf Tool committed
63
{% endblock %}