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

{% block body %}
    <h1>Firma Listesi</h1>
    <ul>
        <li>
            <a class="buttonSubmit" href="{{ path('company_new') }}">Yeni Kayıt</a>
        </li>
    </ul>
    <table>
        <thead>
        <tr>
            <th>Adı</th>
            <th>İşlemler</th>
        </tr>
        </thead>
        <tbody>
        {% for company in companies %}
            <tr>
                <td>{{ company.name }}</td>
                <td>
                    <ul>
                        <li>
                            <a href="{{ path('company_edit', { 'id': company.id }) }}">Düzenle</a>
                        </li>
                        <li>
                            <a href="{{ path('company_delete',{'id': company.id}) }}"
                               class="as-form" data-method="delete" data-csrf="_token:{{ token }}">Sil</a>
                        </li>
                    </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}
