xref: /webtrees/resources/views/note-page-details.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
10f5fd22fSGreg Roach<?php
20f5fd22fSGreg Roach
3*10e06497SGreg Roachdeclare(strict_types=1);
4*10e06497SGreg Roach
50f5fd22fSGreg Roachuse Fisharebest\Webtrees\Auth;
60f5fd22fSGreg Roachuse Fisharebest\Webtrees\Fact;
70f5fd22fSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditNotePage;
80f5fd22fSGreg Roachuse Fisharebest\Webtrees\I18N;
90f5fd22fSGreg Roachuse Fisharebest\Webtrees\Note;
104d35caa7SGreg Roachuse Fisharebest\Webtrees\Registry;
110f5fd22fSGreg Roachuse Illuminate\Support\Collection;
120f5fd22fSGreg Roach
130f5fd22fSGreg Roach/**
140f5fd22fSGreg Roach * @var Note                 $record
1536779af1SGreg Roach * @var Collection<int,Fact> $clipboard_facts
160f5fd22fSGreg Roach * @var string               $text
170f5fd22fSGreg Roach */
180f5fd22fSGreg Roach
190f5fd22fSGreg Roach?>
200f5fd22fSGreg Roach
210f5fd22fSGreg Roach<table class="table wt-facts-table">
220f5fd22fSGreg Roach    <tr>
230f5fd22fSGreg Roach        <th scope="row">
240f5fd22fSGreg Roach            <?= I18N::translate('Shared note') ?>
250f5fd22fSGreg Roach            <?php if (Auth::isEditor($record->tree())) : ?>
26b315f3e1SGreg Roach                <div class="pt-2 wt-fact-edit-links">
270f5fd22fSGreg Roach                    <a class="btn btn-link" href="<?= e(route(EditNotePage::class, ['xref' => $record->xref(), 'tree' => $record->tree()->name()])) ?>" title="<?= I18N::translate('Edit') ?>">
280f5fd22fSGreg Roach                        <?= view('icons/edit') ?>
29315eb316SGreg Roach                        <span class="visually-hidden">
300f5fd22fSGreg Roach                            <?= I18N::translate('Edit') ?>
310f5fd22fSGreg Roach                        </span>
320f5fd22fSGreg Roach                    </a>
330f5fd22fSGreg Roach                </div>
340f5fd22fSGreg Roach            <?php endif ?>
350f5fd22fSGreg Roach        </th>
364d35caa7SGreg Roach        <td>
37d72643a1SDavid Drury          <?= Registry::elementFactory()->make('NOTE:CONC')->value($record->getNote(), $record->tree()) ?>
384d35caa7SGreg Roach        </td>
390f5fd22fSGreg Roach    </tr>
400f5fd22fSGreg Roach
410f5fd22fSGreg Roach    <?php foreach ($record->facts() as $fact) : ?>
424d35caa7SGreg Roach        <?php if ($fact->tag() !== 'NOTE:CONT') : ?>
43b315f3e1SGreg Roach            <?= view('fact', ['fact' => $fact, 'record' => $record]) ?>
444d35caa7SGreg Roach        <?php endif ?>
450f5fd22fSGreg Roach    <?php endforeach ?>
460f5fd22fSGreg Roach</table>
47