xref: /webtrees/resources/views/note-page-details.phtml (revision 05fc85fd27092434b30e184e72b2b4df74bb4c34)
1<?php
2
3use Fisharebest\Webtrees\Auth;
4use Fisharebest\Webtrees\Fact;
5use Fisharebest\Webtrees\Filter;
6use Fisharebest\Webtrees\Functions\FunctionsPrintFacts;
7use Fisharebest\Webtrees\Http\RequestHandlers\EditNotePage;
8use Fisharebest\Webtrees\I18N;
9use Fisharebest\Webtrees\Note;
10use Illuminate\Support\Collection;
11
12/**
13 * @var Note             $record
14 * @var Collection<Fact> $clipboard_facts
15 * @var string           $text
16 */
17
18?>
19
20<table class="table wt-facts-table">
21    <tr>
22        <th scope="row">
23            <?= I18N::translate('Shared note') ?>
24            <?php if (Auth::isEditor($record->tree())) : ?>
25                <div class="editfacts nowrap">
26                    <a class="btn btn-link" href="<?= e(route(EditNotePage::class, ['xref' => $record->xref(), 'tree' => $record->tree()->name()])) ?>" title="<?= I18N::translate('Edit') ?>">
27                        <?= view('icons/edit') ?>
28                        <span class="sr-only">
29                            <?= I18N::translate('Edit') ?>
30                        </span>
31                    </a>
32                </div>
33            <?php endif ?>
34        </th>
35        <td><?= Filter::formatText($record->getNote(), $record->tree()) ?></td>
36    </tr>
37
38    <?php foreach ($record->facts() as $fact) : ?>
39        <?php FunctionsPrintFacts::printFact($fact, $record) ?>
40    <?php endforeach ?>
41</table>
42