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