<p style="width: 100%; text-align: right">
<input type="text" id="searchInput"
       onkeyup="searchTable('gruppe_<?= $gruppen_id; ?>', this)"
       placeholder="<?=__('Filter participant', BDP_LV_PLUGIN_SLUG); ?>">
</p>
<table class="wp-list-table widefat fixed striped table-view-list participant_group" id="gruppe_<?= $gruppen_id; ?>">
    <thead>
    <tr>
        <th style="width: 100px;" scope="col" class="manage-column column-name"><?= __('Name', BDP_LV_PLUGIN_SLUG); ?></th>
        <th class="manage-column column-name"><?= __('Presence days', BDP_LV_PLUGIN_SLUG); ?></th>
        <th class="manage-column column-name"><?= __('Tribe', BDP_LV_PLUGIN_SLUG); ?></th>
        <th class="manage-column column-name"><?= __('Amount', BDP_LV_PLUGIN_SLUG); ?></th>
        <th class="manage-column column-name"><?= __('Email', BDP_LV_PLUGIN_SLUG); ?></th>
        <th class="manage-column column-name"><?= __('Telephone', BDP_LV_PLUGIN_SLUG); ?></th>
        <th class="manage-column column-name"><?= __('Actions', BDP_LV_PLUGIN_SLUG); ?></th>
    </tr>
    </thead>
    <tbody>
    <?php
    foreach ($group as $participant) {
        ?>
        <tr>
            <td>
                <a href="#" onclick="kompass_load_participant_data('<?= $participant->id ?>');"><?= $participant->vorname; ?>
                    <?= $participant->nachname . ($participant->pfadiname != '' ? ' (' . $participant->pfadiname  . ')' : '')?></a><br />
                <?= kompass_get_age($participant->geburtsdatum); ?> Jahre
            </td>
            <td>
                <?= \DateTime::createFromFormat('Y-m-d', $participant->anreise)->format('d.m.Y') ;?> -
                <?= \DateTime::createFromFormat('Y-m-d', $participant->abreise)->format('d.m.Y') ;?>
            </td>
            <td><?= $participant->stamm ?></td>

            <td style="<?= $participant->beitrag_bezahlt !== $participant->beitrag ? 'background-color: #f8c8c6; color: #ff0000;' : '' ?>"


            ><?= $participant->beitrag_bezahlt ?> Euro / <?= $participant->beitrag ?> Euro</td>
            <td><?= $participant->email_1 ?><br /><?= $participant->email_2 ?></td>
            <td>
                <?php kompass_print_telephone_link($participant->telefon_1); ?>
                <br />
                <?php kompass_print_telephone_link($participant->telefon_2); ?></td>
            <td>
                <a href="<?= $admin_link ?>kompass_print_participant_mail_form&participant-id=<?= $participant->id; ?>">Email senden an</a><br />
                <a href="<?= $admin_link ?>show-participant&participant=<?= $participant->id ?>">Bearbeiten</a><br />
                <a href="#" style="color: #72b752" onclick="kompass_participant_update_amount('<?= $participant->beitrag; ?>','<?= $participant->vorname . ' ' . $participant->nachname ?>', <?= $participant->id ?>);">Zahlungseingang </a><br />

                <a href="#" style="color: #ff0000;" onclick="kompass_participant_confirm_delete('<?= $participant->vorname . ' ' . $participant->nachname ?>', <?= $participant->id ?>);">Abmelden</a>
            </td>
        </tr>
        <?php
    }
    ?>
    </tbody>
</table>