xref: /webtrees/resources/views/modules/place-hierarchy/page.phtml (revision a634ddeb721abe74b2e8045f077e9f46c70b6b19)
1*a634ddebSGreg Roach<?php
2*a634ddebSGreg Roach
3*a634ddebSGreg Roachuse Fisharebest\Webtrees\I18N;
4*a634ddebSGreg Roachuse Fisharebest\Webtrees\Tree;
5*a634ddebSGreg Roach
6*a634ddebSGreg Roach/**
7*a634ddebSGreg Roach * @var string $module
8*a634ddebSGreg Roach * @var Tree $tree
9*a634ddebSGreg Roach * @var string $action
10*a634ddebSGreg Roach * @var string $title
11*a634ddebSGreg Roach * @var string $current
12*a634ddebSGreg Roach * @var array $breadcrumbs
13*a634ddebSGreg Roach * @var bool $note
14*a634ddebSGreg Roach * @var string $content
15*a634ddebSGreg Roach * @var bool $showeventslink
16*a634ddebSGreg Roach * @var string $place
17*a634ddebSGreg Roach * @var array $parent
18*a634ddebSGreg Roach * @var array $nextaction
19*a634ddebSGreg Roach */
20*a634ddebSGreg Roach
21*a634ddebSGreg Roach?>
22*a634ddebSGreg Roach
23*a634ddebSGreg Roach<div id="place-hierarchy">
24*a634ddebSGreg Roach    <div class="container">
25*a634ddebSGreg Roach        <h4><?= $title ?></h4>
26*a634ddebSGreg Roach        <h5 class="text-center">
27*a634ddebSGreg Roach            <?php if ($current) : ?>
28*a634ddebSGreg Roach                <a href="<?= e(route('module', ['module' => $module, 'action' => $action, 'tree' => $tree->name()])) ?>">
29*a634ddebSGreg Roach                    <?= I18N::translate('World') ?>
30*a634ddebSGreg Roach                </a>
31*a634ddebSGreg Roach            <?php else : ?>
32*a634ddebSGreg Roach                <?= I18N::translate('World') ?>
33*a634ddebSGreg Roach            <?php endif ?>
34*a634ddebSGreg Roach
35*a634ddebSGreg Roach            <?php foreach ($breadcrumbs as $item) : ?>
36*a634ddebSGreg Roach                -
37*a634ddebSGreg Roach                <a href="<?= e($item->url()) ?>" dir="auto"><?= $item->placeName() ?></a>
38*a634ddebSGreg Roach            <?php endforeach ?>
39*a634ddebSGreg Roach
40*a634ddebSGreg Roach            <?php if ($current) : ?>
41*a634ddebSGreg Roach                - <?= $current->placeName() ?>
42*a634ddebSGreg Roach            <?php endif ?>
43*a634ddebSGreg Roach        </h5>
44*a634ddebSGreg Roach        <?php if ($note) : ?>
45*a634ddebSGreg Roach            <div class="text-center small text-muted">
46*a634ddebSGreg Roach                <?= I18N::translate('Places without valid co-ordinates do not appear on the map and are indicated by the sidebar entry being crossed through') ?>
47*a634ddebSGreg Roach            </div>
48*a634ddebSGreg Roach        <?php endif ?>
49*a634ddebSGreg Roach        <?= $content ?>
50*a634ddebSGreg Roach        <div class="text-center">
51*a634ddebSGreg Roach            <?php if ($showeventslink) : ?>
52*a634ddebSGreg Roach                <a class="formField" href= <?= e(route('module', ['module' => $module, 'action' => $action, 'tree' => $tree->name(), 'parent' => $parent, 'action2' => 'hierarchy-e'])) ?>>
53*a634ddebSGreg Roach                    <?= I18N::translate('View table of events occurring in %s', $place) ?>
54*a634ddebSGreg Roach                </a>
55*a634ddebSGreg Roach                |
56*a634ddebSGreg Roach            <?php endif ?>
57*a634ddebSGreg Roach
58*a634ddebSGreg Roach            <a href="<?= e(route('module', ['module' => $module, 'action' => $action, 'tree' => $tree->name(), 'action2' => key($nextaction)])) ?>">
59*a634ddebSGreg Roach                <?= current($nextaction) ?>
60*a634ddebSGreg Roach            </a>
61*a634ddebSGreg Roach        </div>
62*a634ddebSGreg Roach    </div>
63*a634ddebSGreg Roach</div>
64*a634ddebSGreg Roach
65