digitalfabrik/integreat-cms

View on GitHub
integreat_cms/cms/templates/roles/role_list.html

Summary

Maintainability
Test Coverage
{% extends "_base.html" %}
{% load i18n %}
{% block content %}
    {% load static %}
    <div class="table-header">
        <div class="flex flex-wrap justify-between gap-4">
            <h1 class="heading">
                {% translate "Manage Roles" %}
            </h1>
            <a href="{% url 'new_role' %}" class="btn">{% translate "Create role" %}</a>
        </div>
    </div>
    <div class="table-listing">
        <table class="w-full mt-4 rounded border border-solid border-gray-200 shadow bg-white">
            <thead>
                <tr class="border-b border-solid border-gray-200">
                    <th class="text-sm text-left uppercase py-3 pl-4 pr-2">
                        {% translate "Name" %}
                    </th>
                    <th class="text-sm text-left uppercase py-3 pl-4 pr-2">
                        {% translate "Staff role" %}
                    </th>
                    <th class="text-sm text-left uppercase py-3 p2-4 pr-4 min">
                        {% translate "Options" %}
                    </th>
                </tr>
            </thead>
            <tbody>
                {% for role in roles %}
                    {% include "roles/role_list_row.html" %}
                {% empty %}
                    <tr>
                        <td colspan="6" class="px-2 py-3">
                            {% translate "No roles available yet." %}
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
    {% url "roles" as url %}
    {% include "pagination.html" with chunk=roles %}
{% endblock content %}