{% for company in companies %}
    <tr class="d-flex custom-table-row-body company-mgr-table-row" id="row-company-{{company.id}}" companyid="{{company.id}}" companyname="{{company.name}}" companyboss="{{company.boss.name}}" companykadmin="{{company.kAdmin.name}}">
        <td value="{{company.name}}" class="company-name col-3 p-2">{{company.name}} <i>({{ company.getMembersCount() }} MA)</i></td>
        <td value="{{company.boss.id}}" class="company-boss-id col-3 p-2">
            {% if company.boss == null or company.boss.id == "0" %} 
                <i aria-hidden="true" class="fas fa-exclamation-circle highlight-color"></i>&nbsp;<i>unbesetzt</i>
            {% else %}
                {{company.boss.name}}
            {% endif %}
        </td>
        <td value="{{company.kAdmin.id}}" class="company-kAdmin-id col-3  p-2">
            {% if company.kAdmin == null or company.kAdmin.id == "0" %}
                <i aria-hidden="true" class="fas fa-exclamation-circle highlight-color"></i>&nbsp;<i>unbesetzt</i>
            {% else %}
                {{company.kAdmin.name}}
            {% endif %}
        </td>
        <td class="col-1 p-2">
            {% if canSeeDetails %}
                <span title="Details einsehen" aria-label="Details von {% if settings.user_grouper_name != '' %}{{ settings.user_grouper_name }}{% else %}Unternehmen{% endif %} {{ company.name }} einsehen" role="button">
                    <i aria-hidden="true" onclick="location.href = '{{ company_detail_links[company.id] }}'; event.stopPropagation();" class="pointer fas fa-chart-pie"></i>
                </span>
            {% endif %}
        </td>
        <td id="edit-button-company-{{company.id}}" value="{{company.id}}" kadminid="{{company.kAdmin.id}}" class="pointer edit-button-company {% if (kAdminEditor and (company.kAdmin == null or company.kAdmin.id == "0")) or (bossEditor and (company.boss == null or company.boss.id == "0")) %} highlight-color {% endif %} col-1 p-2">
            <span title="{% if settings.user_grouper_name != '' %}{{ settings.user_grouper_name }}{% else %}Unternehmen{% endif %} bearbeiten" aria-label="{% if settings.user_grouper_name != '' %}{{ settings.user_grouper_name }}{% else %}Unternehmen{% endif %} {{ company.name }} bearbeiten" role="button">
                <i aria-hidden="true" class="fas fa-edit" data-toggle="modal" data-target="#updateFirmaModal"></i>
            </span>
        </td>
        <td id="trash-button-company-{{company.id}}" value="{{company.id}}" class="pointer trash-button-company col-1 p-2">
            <span title="{% if settings.user_grouper_name != '' %}{{ settings.user_grouper_name }}{% else %}Unternehmen{% endif %} löschen" aria-label="{% if settings.user_grouper_name != '' %}{{ settings.user_grouper_name }}{% else %}Unternehmen{% endif %} {{ company.name }} löschen" role="button">
                <i aria-hidden="true" class="fas fa-trash-alt" data-toggle="modal" data-target="#deleteCompanyModal"></i>
            </span>
        </td>
    </tr>
{% endfor %}