xref: /webtrees/resources/views/modules/place-hierarchy/page.phtml (revision 1821c9e596679be8717c51394b448df204b1f577)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Place;
7use Fisharebest\Webtrees\Tree;
8
9/**
10 * @var string       $alt_link
11 * @var string       $alt_url
12 * @var array<Place> $breadcrumbs
13 * @var string       $content
14 * @var Place|null   $current
15 * @var string       $events_link
16 * @var Place        $place
17 * @var string       $title
18 * @var Tree         $tree
19 * @var string       $world_url
20 */
21
22?>
23
24<div id="place-hierarchy">
25    <div class="container">
26        <h4><?= $title ?></h4>
27        <h5 class="text-center">
28            <?php if ($current !== null) : ?>
29                <a href="<?= e($world_url) ?>">
30                    <?= I18N::translate('World') ?>
31                </a>
32            <?php else : ?>
33                <?= I18N::translate('World') ?>
34            <?php endif ?>
35
36            <?php foreach ($breadcrumbs as $item) : ?>
37                -
38                <a href="<?= e($item->url()) ?>" dir="auto"><?= $item->placeName() ?></a>
39            <?php endforeach ?>
40
41            <?php if ($current !== null) : ?>
42                - <?= $current->placeName() ?>
43            <?php endif ?>
44        </h5>
45
46        <?= $content ?>
47
48        <div class="text-center">
49            <?php if ($events_link !== '') : ?>
50                <a class="formField" href= <?= e($events_link) ?>>
51                    <?= I18N::translate('View table of events occurring in %s', $place->fullName()) ?>
52                </a>
53                |
54            <?php endif ?>
55
56            <a href="<?= e($alt_url) ?>">
57                <?= $alt_link ?>
58            </a>
59        </div>
60    </div>
61</div>
62
63