diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-06-27 22:28:46 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-06-28 15:07:07 +0100 |
| commit | a8cd57e1bd9bc297d89d2b7df423a89f32b96a3a (patch) | |
| tree | 36ce0362c3a32d1758887b6f1940d266e5886e59 /resources/views/modules/personal_facts | |
| parent | 20002544dec94826fee034213229f05010ea2666 (diff) | |
| download | webtrees-a8cd57e1bd9bc297d89d2b7df423a89f32b96a3a.tar.gz webtrees-a8cd57e1bd9bc297d89d2b7df423a89f32b96a3a.tar.bz2 webtrees-a8cd57e1bd9bc297d89d2b7df423a89f32b96a3a.zip | |
Reorganise module views
Diffstat (limited to 'resources/views/modules/personal_facts')
| -rw-r--r-- | resources/views/modules/personal_facts/tab.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/resources/views/modules/personal_facts/tab.php b/resources/views/modules/personal_facts/tab.php new file mode 100644 index 0000000000..743bb9eddf --- /dev/null +++ b/resources/views/modules/personal_facts/tab.php @@ -0,0 +1,50 @@ +<?php use Fisharebest\Webtrees\Functions\FunctionsPrint; ?> +<?php use Fisharebest\Webtrees\Functions\FunctionsPrintFacts; ?> +<?php use Fisharebest\Webtrees\I18N; ?> +<?php use Fisharebest\Webtrees\View; ?> + +<div class="wt-facts-tab py-4"> + <table class="table wt-facts-table"> + <tbody> + <tr> + <td colspan="2"> + <label> + <input id="show-relatives-facts" type="checkbox" data-toggle="collapse" data-target=".wt-relation-fact"> + <?= I18N::translate('Events of close relatives') ?> + </label> + <?php if ($has_historical_facts): ?> + <label> + <input id="show-historical-facts" type="checkbox" data-toggle="collapse" data-target=".wt-historic-fact"> + <?= I18N::translate('Historical facts') ?> + </label> + <?php endif ?> + </td> + </tr> + + <?php foreach ($facts as $fact): ?> + <?php FunctionsPrintFacts::printFact($fact, $individual) ?> + <?php endforeach ?> + + <?php if (empty($facts)): ?> + <tr> + <td colspan="2"> + <?= I18N::translate('There are no facts for this individual.') ?> + </td> + </tr> + <?php endif ?> + + <?php if ($individual->canEdit()): ?> + <?php FunctionsPrint::printAddNewFact($individual->getXref(), $facts, 'INDI') ?> + <?php endif ?> + </tbody> + </table> +</div> + +<?php View::push('javascript') ?> +<script> + 'use strict'; + + persistent_toggle("show-relatives-facts", "tr.rela"); + persistent_toggle("show-historical-facts", "tr.histo"); +</script> +<?php View::endpush() ?> |
