xref: /webtrees/resources/views/fact-notes.phtml (revision b11cdcd45131b1585d66693fab363cfeb18c51a4)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Fact;
6
7/**
8 * @var Fact $fact
9 */
10
11?>
12
13<?php if (preg_match_all('/\n(2 NOTE\b.*(?:\n[^2].*)*)/', $fact->gedcom(), $matches, PREG_SET_ORDER) > 0) : ?>
14    <div class="wt-fact-notes mt-2">
15        <?php foreach ($matches as $match) : ?>
16            <?= view('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag(), 'tree' => $fact->record()->tree()]) ?>
17        <?php endforeach ?>
18    </div>
19<?php endif ?>
20