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