xref: /webtrees/resources/views/fact-sources.phtml (revision 1ff45046fabc22237b5d0d8e489c96f031fc598d)
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 SOUR\b.*(?:\n[^2].*)*)/', $fact->gedcom(), $matches, PREG_SET_ORDER) > 0) : ?>
14    <div class="wt-fact-sources 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