12917771cSGreg Roach<?php 22917771cSGreg Roach 3*7c2c99faSGreg Roachuse Fisharebest\Webtrees\Fact; 42917771cSGreg Roachuse Fisharebest\Webtrees\Functions\FunctionsPrintFacts; 52917771cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddNewFact; 62917771cSGreg Roachuse Fisharebest\Webtrees\I18N; 7*7c2c99faSGreg Roachuse Fisharebest\Webtrees\Individual; 82917771cSGreg Roachuse Fisharebest\Webtrees\View; 9*7c2c99faSGreg Roachuse Illuminate\Support\Collection; 10*7c2c99faSGreg Roach 11*7c2c99faSGreg Roach/** 12*7c2c99faSGreg Roach * @var bool $can_edit 13*7c2c99faSGreg Roach * @var Collection<Fact> $clipboard_facts 14*7c2c99faSGreg Roach * @var Collection<Fact> $facts 15*7c2c99faSGreg Roach * @var Individual $individual 16*7c2c99faSGreg Roach */ 172917771cSGreg Roach 182917771cSGreg Roach?> 19dd6b2bfcSGreg Roach 204a2590a5SGreg Roach<div class="wt-tan-notes py-4"> 21dd6b2bfcSGreg Roach <table class="table wt-facts-table"> 22dd6b2bfcSGreg Roach <tr> 23dd6b2bfcSGreg Roach <td colspan="2"> 24dd6b2bfcSGreg Roach <label> 2564490ee2SGreg Roach <input id="show-level-2-notes" type="checkbox" data-toggle="collapse" data-target=".wt-level-two-note"> 26dd6b2bfcSGreg Roach <?= I18N::translate('Show all notes') ?> 27dd6b2bfcSGreg Roach </label> 28dd6b2bfcSGreg Roach </td> 29dd6b2bfcSGreg Roach </tr> 30dd6b2bfcSGreg Roach 31dd6b2bfcSGreg Roach <?php foreach ($facts as $fact) : ?> 32dd6b2bfcSGreg Roach <?php FunctionsPrintFacts::printMainNotes($fact, 1) ?> 33dd6b2bfcSGreg Roach <?php FunctionsPrintFacts::printMainNotes($fact, 2) ?> 34dd6b2bfcSGreg Roach <?php FunctionsPrintFacts::printMainNotes($fact, 3) ?> 35dd6b2bfcSGreg Roach <?php FunctionsPrintFacts::printMainNotes($fact, 4) ?> 36dd6b2bfcSGreg Roach <?php endforeach ?> 37dd6b2bfcSGreg Roach 38075d1a05SGreg Roach <?php if ($facts->isEmpty()) : ?> 39dd6b2bfcSGreg Roach <tr> 40dd6b2bfcSGreg Roach <td colspan="2"> 41dd6b2bfcSGreg Roach <?= I18N::translate('There are no notes for this individual.') ?> 42dd6b2bfcSGreg Roach </td> 43dd6b2bfcSGreg Roach </tr> 44dd6b2bfcSGreg Roach <?php endif ?> 45dd6b2bfcSGreg Roach 46dd6b2bfcSGreg Roach <?php if ($can_edit) : ?> 472adcbd9aSGreg Roach <?= view('edit/paste-fact-row', ['record' => $individual, 'facts' => $clipboard_facts]) ?> 482adcbd9aSGreg Roach 49dd6b2bfcSGreg Roach <tr> 50dd6b2bfcSGreg Roach <th scope="row"> 51dd6b2bfcSGreg Roach <?= I18N::translate('Note') ?> 52dd6b2bfcSGreg Roach </th> 53dd6b2bfcSGreg Roach <td> 542917771cSGreg Roach <a href="<?= e(route(AddNewFact::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'fact' => 'NOTE'])) ?>"> 55dd6b2bfcSGreg Roach <?= I18N::translate('Add a note') ?> 56dd6b2bfcSGreg Roach </a> 57dd6b2bfcSGreg Roach </td> 58dd6b2bfcSGreg Roach </tr> 59dd6b2bfcSGreg Roach <tr> 60dd6b2bfcSGreg Roach <th scope="row"> 61dd6b2bfcSGreg Roach <?= I18N::translate('Shared note') ?> 62dd6b2bfcSGreg Roach </th> 63dd6b2bfcSGreg Roach <td> 642917771cSGreg Roach <a href="<?= e(route(AddNewFact::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'fact' => 'SHARED_NOTE'])) ?>"> 65dd6b2bfcSGreg Roach <?= I18N::translate('Add a shared note') ?> 66dd6b2bfcSGreg Roach </a> 67dd6b2bfcSGreg Roach </td> 68dd6b2bfcSGreg Roach </tr> 69dd6b2bfcSGreg Roach <?php endif ?> 70dd6b2bfcSGreg Roach </table> 71dd6b2bfcSGreg Roach</div> 72dd6b2bfcSGreg Roach 73dd6b2bfcSGreg Roach<?php View::push('javascript') ?> 74dd6b2bfcSGreg Roach<script> 75dd6b2bfcSGreg Roach 'use strict'; 76dd6b2bfcSGreg Roach 772cf1b3d7SGreg Roach webtrees.persistentToggle("show-level-2-notes"); 78dd6b2bfcSGreg Roach</script> 79dd6b2bfcSGreg Roach<?php View::endpush() ?> 80