summaryrefslogtreecommitdiff
path: root/resources/views/modules/statistics-chart/other.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/modules/statistics-chart/other.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/modules/statistics-chart/other.phtml')
-rw-r--r--resources/views/modules/statistics-chart/other.phtml95
1 files changed, 11 insertions, 84 deletions
diff --git a/resources/views/modules/statistics-chart/other.phtml b/resources/views/modules/statistics-chart/other.phtml
index d30979de96..d6e374e4a0 100644
--- a/resources/views/modules/statistics-chart/other.phtml
+++ b/resources/views/modules/statistics-chart/other.phtml
@@ -1,85 +1,12 @@
-<?php use Fisharebest\Webtrees\I18N; ?>
+<?php
+/** @var \Fisharebest\Webtrees\Stats $stats */
+?>
-<h3>
- <?= I18N::translate('Records') ?>: <?= $stats->totalRecords() ?>
-</h3>
-
-<table>
- <tr>
- <td><?= I18N::translate('Media objects') ?></td>
- <td><?= I18N::translate('Sources') ?></td>
- <td><?= I18N::translate('Notes') ?></td>
- <td><?= I18N::translate('Repositories') ?></td>
- </tr>
- <tr>
- <td><?= $stats->totalMedia() ?></td>
- <td><?= $stats->totalSources() ?></td>
- <td><?= $stats->totalNotes() ?></td>
- <td><?= $stats->totalRepositories() ?></td>
- </tr>
-</table>
-
-<h3><?= I18N::translate('Total events'), ': ', $stats->totalEvents() ?></h3>
-
-<table>
- <tr>
- <td><?= I18N::translate('First event'), ' - ', $stats->firstEventType() ?></td>
- <td><?= I18N::translate('Last event'), ' - ', $stats->lastEventType() ?></td>
- </tr>
- <tr>
- <td><?= $stats->firstEvent() ?></td>
- <td><?= $stats->lastEvent() ?></td>
- </tr>
-</table>
-
-<h3><?= I18N::translate('Media objects'), ': ', $stats->totalMedia() ?></h3>
-
-<table>
- <tr>
- <td><?= I18N::translate('Media objects') ?></td>
- </tr>
- <tr>
- <td><?= $stats->chartMedia() ?></td>
- </tr>
-</table>
-
-<h3><?= I18N::translate('Sources'), ': ', $stats->totalSources() ?></h3>
-
-<table>
- <tr>
- <td><?= I18N::translate('Individuals with sources') ?></td>
- <td><?= I18N::translate('Families with sources') ?></td>
- </tr>
- <tr>
- <td><?= $stats->totalIndisWithSources() ?></td>
- <td><?= $stats->totalFamsWithSources() ?></td>
- </tr>
- <tr>
- <td><?= $stats->chartIndisWithSources() ?></td>
- <td><?= $stats->chartFamsWithSources() ?></td>
- </tr>
-</table>
-
-<h3><?= I18N::translate('Places'), ': ', $stats->totalPlaces() ?></h3>
-
-<table>
- <tr>
- <td><?= I18N::translate('Birth places') ?></td>
- <td><?= I18N::translate('Death places') ?></td>
- </tr>
- <tr>
- <td><?= $stats->commonBirthPlacesList() ?></td>
- <td><?= $stats->commonDeathPlacesList() ?></td>
- </tr>
- <tr>
- <td><?= I18N::translate('Marriage places') ?></td>
- <td><?= I18N::translate('Events in countries') ?></td>
- </tr>
- <tr>
- <td><?= $stats->commonMarriagePlacesList() ?></td>
- <td><?= $stats->commonCountriesList() ?></td>
- </tr>
- <tr>
- <td colspan="2"><?= $stats->chartDistribution() ?></td>
- </tr>
-</table>
+<div class="container pt-3">
+ <?= view('statistics/other/total-records', ['stats' => $stats]) ?>
+ <?= view('statistics/other/total-events', ['stats' => $stats]) ?>
+ <?= view('statistics/other/chart-objects', ['stats' => $stats]) ?>
+ <?= view('statistics/other/chart-sources', ['stats' => $stats]) ?>
+ <?= view('statistics/other/places', ['stats' => $stats]) ?>
+ <?= $stats->chartDistribution() ?>
+</div>