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