admin_user_index.html 1.78 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
{% extends "layout.html" %}
{% block title %}Index{% endblock %}

{% block content %}
    <div class="mdl-cell mdl-cell--3-col mdl-grid mdl-grid--no-spacing">
        <table class="mdl-data-table mdl-js-table mdl-shadow--2dp mdl-cell mdl-cell--3-col">
            <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>
                    <th class="mdl-data-table_-cell--non-numeric">Delete</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>
                    <td class="mdl-data-table__cell--non-numeric">
                        <a href="{{ url_for('.user_delete', id=user.id) }}">
                            <i class="material-icons">delete</i>
                        </a>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
        <div class="rede-separator">
            <div class="mdl-cell mdl-cell--1-col">
                <a class="mdl-button mdl-button--colored mdl-js-button mdl-button--fab mdl-js-ripple-effect" href="{{ url_for('.user_new') }}">
                    <i class="material-icons">add</i>
                </a>
            </div>
        </div>
    </div>
{% endblock %}