admin_topic_show.html 3.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
{% extends "admin_index.html" %}
{% from "macros.html" import render_form %}
{% block admin_title %}Topic - {{ topic.name }}{% endblock %}

{% block content %}
    <div class="mdl-cell mdl-cell--6-col mdl-cell--5-col-tablet mdl-cell--4-col-phone mdl-grid mdl-grid--no-spacing">
        <table class="mdl-data-table mdl-js-table mdl-shadow--2dp mdl-cell mdl-cell--12-col">
            <thead>
                <tr>
                    <th class="mdl-data-table__cell--non-numeric">Speaker</th>
                    <th class="mdl-data-table__cell--non-numeric">Topic</th>
                    <th class="mdl-data-table__cell--non-numeric">Count</th>
                    <th class="mdl-data-table__cell--non-numeric">Done</th>
14
                    <th class="mdl-data-table__cell--non-numeric">Edit</th>
15 16 17 18 19 20 21 22 23 24 25 26 27 28
                    <th class="mdl-data-table__cell--non-numeric">Remove</th>
                </tr>
            </thead>
            <tbody>
            {% for statement in topic.sorted_statements() %}
                <tr>
                    <td class="mdl-data-table__cell--non-numeric">{{ statement.speaker.identifier() }}</td>
                    <td class="mdl-data-table__cell--non-numeric">{{ statement.topic.name }}</td>
                    <td class="mdl-data-table__cell--non-numeric">{{ statement.speaker.count(statement.topic) }}</td>
                    <td class="mdl-data-table__cell--non-numeric">
                        <a href="{{ url_for(".statement_done", id=statement.id, topic_id=topic.id) }}">
                            <i class="material-icons">done</i>
                        </a>
                    </td>
29 30 31 32 33 34
                    <td class="mdl-data-table__cell--non-numeric">
                        <a href="{{ url_for(".speaker_edit", id=statement.speaker.id, topic_id=topic.id) }}">
                            <i class="material-icons">edit</i>
                        </a>
                    </td>
 
35 36 37 38 39 40 41 42 43 44
                    <td class="mdl-data-table__cell--non-numeric">
                        <a href="{{ url_for('.statement_delete', id=statement.id, topic_id=topic.id) }}">
                            <i class="material-icons">cancel</i>
                        </a>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
Robin Sonnabend's avatar
Robin Sonnabend committed
45
    <div class="mdl-separator rede-separator"></div>
46 47 48
    <div class="mdl-cell mdl-cell--3-col mdl-cell--3-col-tablet mdl-cell--4-col-phone mdl-grid mdl-grid--no-spacing">
        {{ render_form(form, action_url=url_for(".statement_new"), action_text="Add", title="Add Statement", class_="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone") }}
        <div class="mdl-cell mdl-card mdl-shadow--2dp mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone">
Robin Sonnabend's avatar
Robin Sonnabend committed
49 50 51 52 53 54 55
            <ul>
                {% if topic.sorted_statements()|length() > 0 %}
                <li>
                    <a href="{{ url_for(".statement_done", id=topic.sorted_statements()[0].id, topic_id=topic.id) }}" class="rede-href"><i class="material-icons" role="presentation">redo</i> Next</a>
                </li>
                {% endif %}
                <li><a href="{{ url_for(".statement_undo") }}" class="rede-href"><i class="material-icons" role="presentation">undo</i> Previous</a></li>
56 57 58
            </ul>
        </div>
    </div>
59
{% endblock %}