xref: /webtrees/resources/views/calendar-list.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Fact;
6use Fisharebest\Webtrees\I18N;
7use Illuminate\Support\Collection;
8
9/**
10 * @var Collection<int,Fact> $family_anniversaries
11 * @var Collection<int,Fact> $individual_anniversaries
12 */
13
14?>
15
16<table class="w-100" role="presentation">
17    <tr>
18        <td class="wt-page-options-label text-center w-50">
19            <?= view('icons/individual') ?>
20            <?= I18N::plural('%s individual', '%s individuals', $individual_anniversaries->count(), I18N::number($individual_anniversaries->count())) ?>
21        </td>
22
23        <td class="wt-page-options-label text-center w-50">
24            <?= view('icons/family') ?>
25            <?= I18N::plural('%s family', '%s families', $family_anniversaries->count(), I18N::number($family_anniversaries->count())) ?>
26        </td>
27    </tr>
28
29    <tr>
30        <td class="wt-page-options-value align-top">
31            <ul class="list-unstyled">
32                <?php foreach ($individual_anniversaries as $fact) : ?>
33                    <li>
34                        <a href="<?= e($fact->record()->url()) ?>">
35                            <?= $fact->record()->fullName() ?>
36                        </a>
37
38                        <div class="indent">
39                            <?= $fact->label() ?><?= $fact->date()->display($fact->record()->tree()) ?>
40                            <?php if ($fact->attribute('PLAC') !== '') : ?>
41<?=  $fact->attribute('PLAC') ?>
42                            <?php endif ?>
43                        </div>
44                    </li>
45                <?php endforeach ?>
46            </ul>
47        </td>
48        <td class="wt-page-options-value align-top">
49            <ul class="list-unstyled">
50                <?php foreach ($family_anniversaries as $fact) : ?>
51                    <li>
52                        <a href="<?= e($fact->record()->url()) ?>">
53                            <?= $fact->record()->fullName() ?>
54                        </a>
55
56                        <div class="indent">
57                            <?= $fact->label() ?><?= $fact->date()->display($fact->record()->tree()) ?>
58                            <?php if ($fact->attribute('PLAC') !== '') : ?>
59<?=  $fact->attribute('PLAC') ?>
60                            <?php endif ?>
61                        </div>
62                    </li>
63                <?php endforeach ?>
64            </ul>
65        </td>
66    </tr>
67</table>
68