xref: /webtrees/resources/views/modules/faq/show.phtml (revision ac71572d8462e396ed5a307f05b29381e49f9e6e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6use Illuminate\Support\Collection;
7
8/**
9 * @var Collection<int,object> $faqs
10 * @var string                 $title
11 */
12
13?>
14
15<h2 class="wt-page-title"><?= $title ?></h2>
16
17<table class="faq">
18    <?php foreach ($faqs as $id => $faq) : ?>
19    <tr>
20        <td style="padding: 5px;">
21            <a href="#faq<?= e($id) ?>"><?= e($faq->header) ?></a>
22        </td>
23    </tr>
24    <?php endforeach ?>
25</table>
26
27<?php foreach ($faqs as $id => $faq) : ?>
28    <hr>
29    <div class="faq_title" id="faq<?= $id ?>">
30        <?= e($faq->header) ?>
31        <div class="faq_top faq_italic">
32            <a href="#content"><?= I18N::translate('back to top') ?></a>
33        </div>
34    </div>
35    <div class="faq_body">
36        <?= str_starts_with($faq->faqbody, '<') ? $faq->faqbody : nl2br(e($faq->faqbody), false) ?>
37    </div>
38<?php endforeach ?>
39