summaryrefslogtreecommitdiff
path: root/resources/views/statistics/families/top10-list-age.phtml
diff options
context:
space:
mode:
authorRico Sonntag <mail@ricosonntag.de>2019-01-30 13:24:27 +0100
committerGreg Roach <fisharebest@gmail.com>2019-01-30 12:24:27 +0000
commit8add1155cb77caede54752196ff44696d1346431 (patch)
tree9f3d128bc9153d53d02d9b69d20c26fc2766c779 /resources/views/statistics/families/top10-list-age.phtml
parentc3d1646f7eb0095bcea8d11a6368142b853c1949 (diff)
downloadwebtrees-8add1155cb77caede54752196ff44696d1346431.tar.gz
webtrees-8add1155cb77caede54752196ff44696d1346431.tar.bz2
webtrees-8add1155cb77caede54752196ff44696d1346431.zip
2059 (#2156)
* 2059 - Split other charts into separate views * 2059 - Added some basic bootstrap markup * 2059 - Moved distribution chart out of places table * 2059 - Moved HTML of other statistics (places list) into templates * 2059 - Removed tables, use cards instead * 2059 - Started adding chart.js charts * 2059: Moved template into sub directory * 2059: Refactor family statistics * 2059 - Started splitting places lists * 2059 - Refactor individual statistics * 2059: Moved HTML into templates * 2059: Handle list/nolist of top-10 oldest * 2059 - Use separate templates for lists * 2059: Use templates * 2059 - Minor enhancements * 2059: Moved distribution chart into own class * 2059: Splitted Stats into separate modules * 2059: Use repository pattern to hide complexity and structure methods * 2059: Use illuminate db * 2059: Google charts * 2059: Squash classes * 2059: Use PHPs number formatter to format century ordinal suffix * 2059: Place repository * 2059: Use repositories * 2059: Use illuminate db * 2059: Simplify event repository methods * 2059: Use @inheritDoc to avoid duplicate (or not updated) doc blocks * 2059: PlaceRepository - Use illuminate database * 2059: SexRepository * 2059: Removed not used percentage calculations * 2059: Consolidate classes * 2059: Event dates * 2059: Use constants * 2059: Refactoring Stats * 2059: Rename repo * 2059: Refactor media repository * 2059: Removed Chart.js stuff, doing this in a later update * 2059: Reduce code complexity * 2059: Moved age calculation to separate method * 2059: Fixes after rebase * 2059: Removed obsolete method parameters * 2059: Use view to render hitcounter * 2059: Update phpdoc * 2059: Removed debug output * 2059: Use consts * 2059: Fixed method parameter type hints * 2059: Add missing const types * 2059: Simplify method * 2059: Refactor google charts * 2059: Fixed rebase issues
Diffstat (limited to 'resources/views/statistics/families/top10-list-age.phtml')
-rw-r--r--resources/views/statistics/families/top10-list-age.phtml28
1 files changed, 28 insertions, 0 deletions
diff --git a/resources/views/statistics/families/top10-list-age.phtml b/resources/views/statistics/families/top10-list-age.phtml
new file mode 100644
index 0000000000..9728c2422f
--- /dev/null
+++ b/resources/views/statistics/families/top10-list-age.phtml
@@ -0,0 +1,28 @@
+<?php
+declare(strict_types=1);
+
+use Fisharebest\Webtrees\Family;
+use Fisharebest\Webtrees\I18N;
+use Fisharebest\Webtrees\Individual;
+
+/* @var array $records */
+/* @var Family $family */
+/* @var Individual $child1 */
+/* @var Individual $child2 */
+?>
+
+<ul class="list-group list-group-flush">
+ <?php foreach ($records as $record): ?>
+ <?php $child1 = $record['child1']; ?>
+ <?php $child2 = $record['child2']; ?>
+ <?php $family = $record['family']; ?>
+ <li class="list-group-item d-flex justify-content-between align-items-center">
+ <span>
+ <a href="<?= e($child2->url()) ?>"><?= $child2->getFullName() ?></a> <?= I18N::translate('and') ?> <a href="<?= e($child1->url()) ?>"><?= $child1->getFullName() ?></a>
+ <br>
+ <a href="<?= e($family->url()) ?>">[<?= I18N::translate('View this family') ?>]</a>
+ </span>
+ <span class="badge badge-secondary badge-pill ml-3"><?= $record['age'] ?></span>
+ </li>
+ <?php endforeach; ?>
+</ul>