xref: /webtrees/resources/views/lists/anniversaries-table.phtml (revision 39c990acdae56e02eaa7ff99ee9fcf5395c13d20)
148f08416SGreg Roach<?php use Fisharebest\Webtrees\I18N; ?>
248f08416SGreg Roach<?php use Fisharebest\Webtrees\Individual; ?>
348f08416SGreg Roach<?php use Fisharebest\Webtrees\View; ?>
448f08416SGreg Roach
548f08416SGreg Roach<table class="table table-sm datatable wt-table-events" data-info="false" data-paging="false" data-searching="false" data-sorting="<?= e('[[1, "asc" ]]') ?>">
648f08416SGreg Roach    <thead>
748f08416SGreg Roach        <tr>
848f08416SGreg Roach            <th>
948f08416SGreg Roach                <?= I18N::translate('Record') ?>
1048f08416SGreg Roach            </th>
1148f08416SGreg Roach            <th>
1248f08416SGreg Roach                <?= I18N::translate('Date') ?>
1348f08416SGreg Roach            </th>
1448f08416SGreg Roach            <th>
1548f08416SGreg Roach                <?= view('icons/anniversary') ?>
1648f08416SGreg Roach                <span class="sr-only"><?= I18N::translate('Anniversary') ?></span>
1748f08416SGreg Roach            </th>
1848f08416SGreg Roach            <th>
1948f08416SGreg Roach                <?= I18N::translate('Event') ?>
2048f08416SGreg Roach            </th>
2148f08416SGreg Roach        </tr>
2248f08416SGreg Roach    </thead>
2348f08416SGreg Roach    <tbody>
2448f08416SGreg Roach        <?php foreach ($facts as $fact) : ?>
2548f08416SGreg Roach            <?php $record = $fact->record(); ?>
2648f08416SGreg Roach            <tr>
2748f08416SGreg Roach                <td data-sort="<?= e($record->sortName()) ?>">
2848f08416SGreg Roach                    <a href="<?= e($record->url()) ?>">
2948f08416SGreg Roach                        <?= $record->fullName() ?>
3048f08416SGreg Roach                    </a>
3148f08416SGreg Roach                    <?php if ($record instanceof Individual) : ?>
3248f08416SGreg Roach                        <?= $record->getSexImage() ?>
3348f08416SGreg Roach                    <?php endif ?>
3448f08416SGreg Roach                </td>
3548f08416SGreg Roach                <td data-sort="<?= $fact->date()->julianDay() ?>">
36*39c990acSGreg Roach                    <?= $fact->date()->display(true) ?>
3748f08416SGreg Roach                </td>
3848f08416SGreg Roach                <td data-sort="<?= $fact->anniv ?>">
3948f08416SGreg Roach                    <?= $fact->anniv ?>
4048f08416SGreg Roach                </td>
4148f08416SGreg Roach                <td data-sort="<?= $fact->label() ?>">
4248f08416SGreg Roach                    <?= $fact->label() ?>
4348f08416SGreg Roach                </td>
4448f08416SGreg Roach            </tr>
4548f08416SGreg Roach        <?php endforeach ?>
4648f08416SGreg Roach    </tbody>
4748f08416SGreg Roach</table>
4848f08416SGreg Roach
4948f08416SGreg Roach<?php View::push('javascript') ?>
5048f08416SGreg Roach<script>
5148f08416SGreg Roach  $(".wt-table-events").dataTable();
5248f08416SGreg Roach</script>
5348f08416SGreg Roach<?php View::endpush() ?>
54