speech_update_show.html 1.7 KB
Newer Older
YSelf Tool's avatar
YSelf Tool committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
{% from "macros.html" import render_form %}
    <table class="mdl-data-table mdl-js-table mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone">
        <thead>
            <tr>
                <th class="mdl-data-table__cell--non-numeric">Speaker</th>
                {% if mode == "all" or mode == "past" %}
                <th class="mdl-data-table__cell--non-numeric">Time</th>
                {% endif %}
            </tr>
        </thead>
        <tbody>
        {% if mode == "all" or mode == "past" %}
            {% for statement, speaker in statements %}
                <tr>
                    <td class="mdl-data-table__cell--non-numeric">
                        {{ speaker.name }}
                    </td>
                    {% if mode == "all" %}
                    <td class="mdl-data-table__cell--non-numeric">
                        {{ statement.insertion_time.strftime("%d. %B %Y, %H:%M") }}
                    </td>
                    {% elif mode == "past" %}
                    <td class="mdl-data-table__cell--non-numeric">
                        {{ statement.execution_time.strftime("%d. %B %Y, %H:%M") }}
                    </td>
                    {% endif %}
                </tr>
            {% endfor %}
        {% elif mode == "pending" %}
            {% for statement, speaker, count in statements %}
                {% if not statement.executed %}
                    <tr>
                        <td class="mdl-data-table__cell--non-numeric">
                            <h5>{{ speaker.name }}</h5>
                        </td>
                    </tr>
                {% endif %}
            {% endfor %}
        {% endif %}
        </tbody>
    </table>