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