{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}

{% block title %}{{ 'Document category list' | trans }}{% endblock title %}

{% block admin_content %}
    <h1>{{ 'Document category list' | trans }}</h1>

    <table class="table table-bordered border-dark align-middle">
        <thead>
            <tr>
{#                <th>{{ 'Creator bundle id' | trans }}</th>#}
                <th>{{ 'Internal id inside creator bundle' | trans }}</th>
                <th>{{ 'Document class' | trans }}</th>
                <th>{{ 'Name' | trans }}</th>
                <th class="w-25">{{ 'Actions' | trans }}</th>
            </tr>
        </thead>
        <tbody>
        {% for document_category in document_categories %}
            <tr>
{#                <td>{{ document_category.bundleId }}</td>#}
                <td>{{ document_category.idInsideBundle }}</td>
                <td>{{ document_category.documentClass }}</td>
                <td>{{ document_category.name | localize_translatable_string}}</td>

                <td class="text-end">
                    <a href="{{ path('document_category_show', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}"
                       class="btn btn-show" title="{{ 'show' | trans }}"></a>
                    <a href="{{ path('document_category_edit', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}"
                       class="btn btn-edit" title="{{ 'edit' | trans }}"></a>
                </td>
            </tr>
        {% else %}
            <tr>
                <td colspan="4">{{ 'no records found' | trans }}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <ul class="record_actions sticky-form-buttons">
        <li>
            <a href="{{ path('document_category_new') }}" class="btn btn-create">{{ 'Create new category' | trans }}</a>
        </li>
    </ul>
{% endblock %}
