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/sources_tab/tab.php | |
| parent | 20002544dec94826fee034213229f05010ea2666 (diff) | |
| download | webtrees-a8cd57e1bd9bc297d89d2b7df423a89f32b96a3a.tar.gz webtrees-a8cd57e1bd9bc297d89d2b7df423a89f32b96a3a.tar.bz2 webtrees-a8cd57e1bd9bc297d89d2b7df423a89f32b96a3a.zip | |
Reorganise module views
Diffstat (limited to 'resources/views/modules/sources_tab/tab.php')
| -rw-r--r-- | resources/views/modules/sources_tab/tab.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/resources/views/modules/sources_tab/tab.php b/resources/views/modules/sources_tab/tab.php new file mode 100644 index 0000000000..0918076156 --- /dev/null +++ b/resources/views/modules/sources_tab/tab.php @@ -0,0 +1,51 @@ +<?php use Fisharebest\Webtrees\Functions\FunctionsPrintFacts; ?> +<?php use Fisharebest\Webtrees\Html; ?> +<?php use Fisharebest\Webtrees\I18N; ?> +<?php use Fisharebest\Webtrees\View; ?> + +<div class="wt-sources-tab py-4"> + <table class="table wt-facts-table"> + <tr> + <td colspan="2"> + <label> + <input id="show-level-2-sources" type="checkbox"> + <?= I18N::translate('Show all sources') ?> + </label> + </td> + </tr> + + <?php foreach ($facts as $fact): ?> + <?php FunctionsPrintFacts::printMainSources($fact, 1) ?> + <?php FunctionsPrintFacts::printMainSources($fact, 2) ?> + <?php endforeach ?> + + <?php if (empty($facts)): ?> + <tr> + <td colspan="2"> + <?= I18N::translate('There are no source citations for this individual.') ?> + </td> + </tr> + <?php endif ?> + + <?php if ($can_edit): ?> + <tr> + <th scope="row"> + <?= I18N::translate('Source') ?> + </th> + <td> + <a href="<?= e(Html::url('edit_interface.php', ['action' => 'add', 'ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'fact' => 'SOUR'])) ?>"> + <?= I18N::translate('Add a source citation') ?> + </a> + </td> + </tr> + <?php endif ?> + </table> +</div> + +<?php View::push('javascript') ?> +<script> + 'use strict'; + + persistent_toggle("show-level-2-sources", ".row_sour2"); +</script> +<?php View::endpush() ?> |
