{% extends "core/settings/settings_base.html" %}
{% load i18n %}

{% block settings_content %}
    <a class="btn btn-secondary" href="{% url "pages:settings_page_create" %}"><span
            class="fa fa-plus"></span> {% trans "Add page" %}</a>
    <table class="table table-striped display mt-2">
        <thead>
        <tr>
            <th>{% translate "Title" %}</th>
            <th>{% translate "Action" %}</th>
        </tr>
        </thead>
        <tbody>
        {% for page in page_list %}
            <tr>
                <td class="break-word">{{ page.title }}</td>
                <td class="d-flex">
                    <a class="btn btn-secondary btn-sm text-nowrap me-1"
                       href="{% url "pages:page_detail" page.slug %}"><span
                            class="fa fa-eye"></span> <span class="d-none d-md-inline">{% trans "View" %}</span></a>
                    <a class="btn btn-secondary btn-sm text-nowrap me-1"
                       href="{% url "pages:settings_page_edit" page.pk %}"><span
                            class="fa fa-edit"></span> <span class="d-none d-md-inline">{% trans "Edit" %}</span></a>
                    <a class="btn btn-secondary btn-sm text-nowrap me-1"
                       href="{% url "pages:settings_page_delete" page.pk %}"><span
                            class="fa fa-trash"></span> <span class="d-none d-md-inline">{% trans "Delete" %}</span></a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}
