admin_index.html 2.64 KB
Newer Older
YSelf Tool's avatar
YSelf Tool committed
1
{% extends "layout.html" %}
YSelf Tool's avatar
YSelf Tool committed
2
{% block title %}{% block admin_title %}Index{% endblock %} - Administration{% endblock %}
YSelf Tool's avatar
YSelf Tool committed
3 4

{% block content %}
YSelf Tool's avatar
YSelf Tool committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    <div class="mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet mdl-cell--4-col-phone mdl-grid mdl-grid--no-spacing">
        <table class="mdl-data-table mdl-js-table mdl-shadow--2dp sortable 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">Full Name</th>
                    <th class="mdl-data-table__cell--non-numeric">Username</th>
                    <th class="mdl-data-table__cell--non-numeric">Roles</th>
                </tr>
            </thead>
            <tbody>
            {% for user in users %}
                <tr>
                    <td class="mdl-data-table__cell--non-numeric"><a href="{{ url_for(".user_edit", id=user.id) }}">{{ user.fullname }}</a></td>
                    <td class="mdl-data-table__cell--non-numeric">{{ user.username }}</td>
                    <td class="mdl-data-table__cell--non-numeric">{% if user.roles is not none %}{{ ", ".join(user.roles) }}{% endif %}</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
        <div class="mdl-cell mdl-cell--3-col mdl-cell--3-col-tablet mdl-cell--2-col-phone">
            <a class="mdl-button mdl-button--colored mdl-js-button" href="{{ url_for(".user") }}">
                All users
            </a>
        </div>
YSelf Tool's avatar
YSelf Tool committed
29
    </div>
YSelf Tool's avatar
YSelf Tool committed
30 31 32 33 34
    <div class="mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet mdl-cell--4-col-phone mdl-grid mdl-grid--no-spacing">
        <table class="mdl-data-table mdl-js-table mdl-shadow--2dp sortable 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">Name</th>
35
                    <th class="mdl-data-table__cell--non-numeric">Mode</th>
YSelf Tool's avatar
YSelf Tool committed
36 37 38
                </tr>
            </thead>
            <tbody>
Hinrikus Wolf's avatar
Hinrikus Wolf committed
39
            {% for topic in events %}
YSelf Tool's avatar
YSelf Tool committed
40
                <tr>
Hinrikus Wolf's avatar
Hinrikus Wolf committed
41 42
                    <td class="mdl-data-table__cell--non-numeric"><a href="{{ url_for(".topic_edit", id=event.id) }}">{{ event.name }}</a></td>
                    <td class="mdl-data-table__cell--non-numeric">{{ topic.mode }}</td>
YSelf Tool's avatar
YSelf Tool committed
43 44 45 46 47
                </tr>
            {% endfor %}
            </tbody>
        </table>
        <div class="mdl-cell mdl-cell--3-col mdl-cell--3-col-tablet mdl-cell--2-col-phone">
Hinrikus Wolf's avatar
Hinrikus Wolf committed
48 49
            <a class="mdl-button mdl-button--colored mdl-js-button" href="{{ url_for(".topic") }}">
                All topics
YSelf Tool's avatar
YSelf Tool committed
50 51 52 53
            </a>
        </div>
    </div>

YSelf Tool's avatar
YSelf Tool committed
54
{% endblock %}