summaryrefslogtreecommitdiff
path: root/resources/views/statistics/families/marriage-length.phtml
diff options
context:
space:
mode:
authorRico Sonntag <mail@ricosonntag.de>2019-02-13 09:46:29 +0100
committerGreg Roach <fisharebest@gmail.com>2019-02-13 08:46:29 +0000
commitdd7dd2a11a7399e56fa4d21fb56b0ecdff69c7d0 (patch)
tree10482649630bcbd939bda47a84dfb73a7f4b3488 /resources/views/statistics/families/marriage-length.phtml
parent40217a61a2f92b29f16fd9c08e85ae48a5ff6a06 (diff)
downloadwebtrees-dd7dd2a11a7399e56fa4d21fb56b0ecdff69c7d0.tar.gz
webtrees-dd7dd2a11a7399e56fa4d21fb56b0ecdff69c7d0.tar.bz2
webtrees-dd7dd2a11a7399e56fa4d21fb56b0ecdff69c7d0.zip
Display message if no data/charts are available (#2210)
Diffstat (limited to 'resources/views/statistics/families/marriage-length.phtml')
-rw-r--r--resources/views/statistics/families/marriage-length.phtml22
1 files changed, 18 insertions, 4 deletions
diff --git a/resources/views/statistics/families/marriage-length.phtml b/resources/views/statistics/families/marriage-length.phtml
index b4acdd99fd..262d99bf3b 100644
--- a/resources/views/statistics/families/marriage-length.phtml
+++ b/resources/views/statistics/families/marriage-length.phtml
@@ -14,22 +14,36 @@ use Fisharebest\Webtrees\I18N;
<div class="card-deck">
<div class="col-12 col-md-6 mb-3">
<div class="card m-0">
+ <?php $age = $stats->topAgeOfMarriage() ?>
+ <?php $result = $stats->topAgeOfMarriageFamily() ?>
<h5 class="card-header">
- <?= I18N::translate('Longest marriage'), ' - ', $stats->topAgeOfMarriage() ?>
+ <?= I18N::translate('Longest marriage') ?>
+ <?php if ($age): ?><?= ' - ', $age ?><?php endif; ?>
</h5>
<div class="card-body">
- <?= $stats->topAgeOfMarriageFamily() ?>
+ <?php if ($result): ?>
+ <?= $result ?>
+ <?php else: ?>
+ <?= I18N::translate('This information is not available.'); ?>
+ <?php endif; ?>
</div>
</div>
</div>
<div class="col-12 col-md-6 mb-3">
<div class="card m-0">
+ <?php $age = $stats->minAgeOfMarriage() ?>
+ <?php $result = $stats->minAgeOfMarriageFamily() ?>
<h5 class="card-header">
- <?= I18N::translate('Shortest marriage'), ' - ', $stats->minAgeOfMarriage() ?>
+ <?= I18N::translate('Shortest marriage') ?>
+ <?php if ($age): ?><?= ' - ', $age ?><?php endif; ?>
</h5>
<div class="card-body">
- <?= $stats->minAgeOfMarriageFamily() ?>
+ <?php if ($result): ?>
+ <?= $result ?>
+ <?php else: ?>
+ <?= I18N::translate('This information is not available.'); ?>
+ <?php endif; ?>
</div>
</div>
</div>