summaryrefslogtreecommitdiff
path: root/resources/views/fact-sources.phtml
blob: 43673891253fe1acec9427026079af4f7dafba7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

declare(strict_types=1);

use Fisharebest\Webtrees\Fact;

/**
 * @var Fact $fact
 */

?>

<?php if (preg_match_all('/\n(2 SOUR\b.*(?:\n[^2].*)*)/', $fact->gedcom(), $matches, PREG_SET_ORDER) > 0) : ?>
    <div class="wt-fact-sources mt-2">
        <?php foreach ($matches as $match) : ?>
            <?= view('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag(), 'tree' => $fact->record()->tree()]) ?>
        <?php endforeach ?>
    </div>
<?php endif ?>