xref: /webtrees/resources/views/fact-sources.phtml (revision ac71572d8462e396ed5a307f05b29381e49f9e6e)
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