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

{% block content %}
YSelf Tool's avatar
YSelf Tool committed
6
7
8
9
10
    {% for statements, add_form, event in meta %}
        <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">
            <thead>
                <tr>
                    <th class="mdl-data-table__cell--non-numeric">Speaker</th>
11
                    {% if (mode is not none and mode == "balanced") or (mode is none and event.mode == "balanced") %}
YSelf Tool's avatar
YSelf Tool committed
12
                    <th>Count</th>
13
                    {% endif %}
YSelf Tool's avatar
YSelf Tool committed
14
15
16
17
18
19
20
21
22
23
24
25
                    {% 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>
26
                    {% if (mode is not none and mode == "balanced") or (mode is none and event.mode == "balanced") %}
YSelf Tool's avatar
YSelf Tool committed
27
28
29
                    <td>
                        <h5>{{ count }}</h5>
                    </td>
30
                    {% endif %}
YSelf Tool's avatar
YSelf Tool committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
                    {% if "user" in current_user.roles %}
                    <td class="mdl-data-table__cell--non-numeric">
                        <a href="{{ url_for(".done", statement=statement.id, next=".index", event=event_id) }}">
                            <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">
                        <a href="{{ url_for(".cancel", statement=statement.id, next=".index", event=event_id) }}">
                            <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>
        {% 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)) }}
        {% endif %}
    {% endfor %}
YSelf Tool's avatar
YSelf Tool committed
55
{% endblock %}