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