summaryrefslogtreecommitdiff
path: root/resources/views/calendar-list.phtml
blob: b08fcb12711045cdf6d0122f2b2e2b80fe17b2ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php

declare(strict_types=1);

use Fisharebest\Webtrees\Fact;
use Fisharebest\Webtrees\I18N;

/**
 * @var iterable<int,Fact> $family_anniversaries
 * @var iterable<int,Fact> $individual_anniversaries
 * @var int                $family_count
 * @var int                $individual_count
 */

?>

<table class="w-100" role="presentation">
    <tr>
        <td class="wt-page-options-label text-center w-50">
            <?= view('icons/individual') ?>
            <?= I18N::plural('%s individual', '%s individuals', $individual_count, I18N::number($individual_count)) ?>
        </td>

        <td class="wt-page-options-label text-center w-50">
            <?= view('icons/family') ?>
            <?= I18N::plural('%s family', '%s families', $family_count, I18N::number($family_count)) ?>
        </td>
    </tr>

    <tr>
        <td class="wt-page-options-value align-top">
            <ul class="list-unstyled">
                <?php foreach ($individual_anniversaries as $fact) : ?>
                    <li>
                        <a href="<?= e($fact->record()->url()) ?>">
                            <?= $fact->record()->fullName() ?>
                        </a>

                        <div class="indent">
                            <?= $fact->label() ?> — <?= $fact->date()->display($fact->record()->tree()) ?>
                            <?php if ($fact->attribute('PLAC') !== '') : ?>
                                — <?=  $fact->attribute('PLAC') ?>
                            <?php endif ?>
                        </div>
                    </li>
                <?php endforeach ?>
            </ul>
        </td>
        <td class="wt-page-options-value align-top">
            <ul class="list-unstyled">
                <?php foreach ($family_anniversaries as $fact) : ?>
                    <li>
                        <a href="<?= e($fact->record()->url()) ?>">
                            <?= $fact->record()->fullName() ?>
                        </a>

                        <div class="indent">
                            <?= $fact->label() ?> — <?= $fact->date()->display($fact->record()->tree()) ?>
                            <?php if ($fact->attribute('PLAC') !== '') : ?>
                                — <?=  $fact->attribute('PLAC') ?>
                            <?php endif ?>
                        </div>
                    </li>
                <?php endforeach ?>
            </ul>
        </td>
    </tr>
</table>