xref: /webtrees/resources/views/modules/place-hierarchy/sidebar.phtml (revision 9f9acdbc09170c04c1e150c36ee57d49027e314a)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4use Fisharebest\Webtrees\Place;
5
6/**
7 * @var bool   $showlink
8 * @var Place  $place
9 * @var string $flag
10 * @var int    $id
11 * @var string $sidebar_class
12 * @var array  $stats
13 */
14?>
15
16<li class="gchart px-md-2 <?= $sidebar_class ?>" data-id="<?= $id ?>">
17    <div class="row label">
18        <div class="col" style="word-wrap: break-word">
19            <?php if ($showlink) : ?>
20                <a href="<?= e($place->url()) ?>">
21                    <?= $place->placeName() ?>
22                </a>
23            <?php else : ?>
24                <?= $place->placeName() ?>
25            <?php endif ?>
26        </div>
27
28        <?php if ($flag) : ?>
29            <div class="col-sm-3 align-digits">
30                <img class="flag" alt="<?= strip_tags($place->placeName()) ?>" title="<?= strip_tags($place->placeName()) ?>" src="<?= $flag ?>">
31            </div>
32        <?php endif ?>
33    </div>
34
35    <?php if ($sidebar_class === 'unmapped') : ?>
36        <div class="row">
37            <div class="col-sm-9"><i><?= I18N::translate('The location of this place is not known.') ?></i></div>
38            <div class="col-sm-3 align-digits"><?= view('icons/warning') ?></div>
39        </div>
40    <?php endif ?>
41
42    <div class="row">
43        <div class="col-sm-9"><?= I18N::translate('Individuals') ?></div>
44        <div class="col-sm-3 align-digits"><?= $stats['INDI'] ?></div>
45    </div>
46
47    <div class="row">
48        <div class="col-sm-9"><?= I18N::translate('Families') ?></div>
49        <div class="col-sm-3 align-digits"><?= $stats['FAM'] ?></div>
50    </div>
51</li>
52