xref: /webtrees/resources/views/note-page-details.phtml (revision 81585c874c45034cf46a445fc8622728464b24a8)
1<?php
2
3use Fisharebest\Webtrees\Auth;
4use Fisharebest\Webtrees\Fact;
5use Fisharebest\Webtrees\Functions\FunctionsPrintFacts;
6use Fisharebest\Webtrees\Http\RequestHandlers\EditNotePage;
7use Fisharebest\Webtrees\I18N;
8use Fisharebest\Webtrees\Note;
9use Fisharebest\Webtrees\Registry;
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="visually-hidden">
29                            <?= I18N::translate('Edit') ?>
30                        </span>
31                    </a>
32                </div>
33            <?php endif ?>
34        </th>
35        <td>
36          <?= Registry::elementFactory()->make('NOTE:CONC')->value($record->getNote(), $record->tree()) ?>
37        </td>
38    </tr>
39
40    <?php foreach ($record->facts() as $fact) : ?>
41        <?php if ($fact->tag() !== 'NOTE:CONT') : ?>
42           <?php FunctionsPrintFacts::printFact($fact, $record) ?>
43    <?php endif ?>
44    <?php endforeach ?>
45</table>
46