diff options
| author | Rico Sonntag <mail@ricosonntag.de> | 2019-02-13 09:46:29 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2019-02-13 08:46:29 +0000 |
| commit | dd7dd2a11a7399e56fa4d21fb56b0ecdff69c7d0 (patch) | |
| tree | 10482649630bcbd939bda47a84dfb73a7f4b3488 /resources/views/statistics/families/top10-list-grand.phtml | |
| parent | 40217a61a2f92b29f16fd9c08e85ae48a5ff6a06 (diff) | |
| download | webtrees-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/top10-list-grand.phtml')
| -rw-r--r-- | resources/views/statistics/families/top10-list-grand.phtml | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/resources/views/statistics/families/top10-list-grand.phtml b/resources/views/statistics/families/top10-list-grand.phtml index bb2c1c2f64..2fc4ca9d7c 100644 --- a/resources/views/statistics/families/top10-list-grand.phtml +++ b/resources/views/statistics/families/top10-list-grand.phtml @@ -8,14 +8,20 @@ use Fisharebest\Webtrees\I18N; /* @var Family $family */ ?> -<ul class="list-group list-group-flush"> - <?php foreach ($records as $record): ?> - <?php $family = $record['family']; ?> - <li class="list-group-item d-flex justify-content-between align-items-center"> - <a href="<?= e($family->url()) ?>"><?= $family->getFullName() ?></a> - <span class="badge badge-secondary badge-pill ml-3"> - <?= I18N::plural('%s grandchild', '%s grandchildren', $record['count'], I18N::number($record['count'])) ?> - </span> - </li> - <?php endforeach; ?> -</ul> +<?php if ($records): ?> + <ul class="list-group list-group-flush"> + <?php foreach ($records as $record): ?> + <?php $family = $record['family']; ?> + <li class="list-group-item d-flex justify-content-between align-items-center"> + <a href="<?= e($family->url()) ?>"><?= $family->getFullName() ?></a> + <span class="badge badge-secondary badge-pill ml-3"> + <?= I18N::plural('%s grandchild', '%s grandchildren', $record['count'], I18N::number($record['count'])) ?> + </span> + </li> + <?php endforeach; ?> + </ul> +<?php else: ?> + <div class="card-body"> + <?= I18N::translate('This information is not available.'); ?> + </div> +<?php endif; ?> |
