{% extends 'admin_base.html.twig' %}

{% block title %}WidgetForm index{% endblock %}

{% block body %}
    <h1>Виджет формы</h1>

    <table class="table">
        <thead>
            <tr>
                <th>Id</th>
                <th>Name</th>
                <th>Link</th>
                <th>actions</th>
            </tr>
        </thead>
        <tbody>
        {% for widget_form in widget_forms %}
            <tr>
                <td>{{ widget_form.id }}</td>
                <td>{{ widget_form.name }}</td>
                <td>{{ absolute_url(path('widget_form_show', {'id': widget_form.id})) }}</td>
                <td>
                    <a href="{{ path('widget_form_editor', {'id': widget_form.id}) }}">настроить поля формы</a> <br>
                    <a href="{{ path('widget_form_edit', {'id': widget_form.id}) }}">редактировать форму</a>
                </td>
            </tr>
        {% else %}
            <tr>
                <td colspan="3">no records found</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <a href="{{ path('widget_form_new') }}">Create new</a>
{% endblock %}
