summaryrefslogtreecommitdiff
path: root/resources/views/statistics/other/total-events.phtml
blob: 7704dc90cc29903cbbbe3762b5f2e762b04e8f0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
declare(strict_types=1);

use Fisharebest\Webtrees\I18N;

/** @var \Fisharebest\Webtrees\Statistics $stats */
?>

<h4 class="border-bottom p-2 mb-4">
    <?= I18N::translate('Total events') ?>
    <span class="badge badge-secondary badge-pill float-right"><?= $stats->totalEvents() ?></span>
</h4>

<div class="mb-3">
    <div class="card-deck">
        <div class="col-12 col-md-6 mb-3">
            <div class="card m-0">
                <?php $type   = $stats->firstEventType() ?>
                <?php $result = $stats->firstEvent() ?>
                <h5 class="card-header">
                    <?= I18N::translate('First event') ?>
                    <?php if ($type): ?><?= ' - ', $type ?><?php endif; ?>
                </h5>
                <div class="card-body">
                    <?= $result ?>
                </div>
            </div>
        </div>

        <div class="col-12 col-md-6 mb-3">
            <div class="card m-0">
                <?php $type   = $stats->lastEventType() ?>
                <?php $result = $stats->lastEvent() ?>
                <h5 class="card-header">
                    <?= I18N::translate('Last event') ?>
                    <?php if ($type): ?><?= ' - ', $type ?><?php endif; ?>
                </h5>
                <div class="card-body">
                    <?= $result ?>
                </div>
            </div>
        </div>
    </div>
</div>