1<?php use Fisharebest\Webtrees\I18N; ?> 2 3<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('Modules'), $title]]) ?> 4 5<h1><?= $title ?></h1> 6 7<p> 8 <?= /* I18N: FAQ = “Frequently Asked Question” */ 9 I18N::translate('FAQs are lists of questions and answers, which allow you to explain the site’s rules, policies, and procedures to your visitors. Questions are typically concerned with privacy, copyright, user-accounts, unsuitable content, requirement for source-citations, etc.') ?> 10 <?= I18N::translate('You may use HTML to format the answer and to add links to other websites.') ?> 11</p> 12 13<p> 14<form class="form form-inline"> 15 <input type="hidden" name="route" value="module"> 16 <input type="hidden" name="module" value="faq"> 17 <input type="hidden" name="action" value="Admin"> 18 <label for="ged" class="sr-only"> 19 <?= I18N::translate('Family tree') ?> 20 </label> 21 <?= view('components/select', ['name' => 'ged', 'selected' => $tree->name(), 'values' => $tree_names]) ?> 22 <input type="submit" class="btn btn-primary" value="<?= I18N::translate('show') ?>"> 23</form> 24</p> 25 26<p> 27 <a href="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminEdit', 'ged' => $tree->name()])) ?>" class="btn btn-link"> 28 <?= view('icons/add') ?> 29 <?= /* I18N: FAQ = “Frequently Asked Question” */ 30 I18N::translate('Add an FAQ') ?> 31 </a> 32</p> 33 34<table class="table table-bordered"> 35 <thead> 36 <tr> 37 <th><?= I18N::translate('Sort order') ?></th> 38 <th><?= I18N::translate('Family tree') ?></th> 39 <th><?= I18N::translate('Question') ?></th> 40 <th><span class="sr-only"><?= I18N::translate('Move up') ?></span></th> 41 <th><span class="sr-only"><?= I18N::translate('Move down') ?></span></th> 42 <th><span class="sr-only"><?= I18N::translate('Edit') ?></span></th> 43 <th><span class="sr-only"><?= I18N::translate('Delete') ?></span></th> 44 </tr> 45 </thead> 46 <tbody> 47 <?php foreach ($faqs as $faq) : ?> 48 <tr class="faq_edit_pos"> 49 <td> 50 <?= I18N::number($faq->block_order + 1) ?> 51 </td> 52 <td> 53 <?php if ($faq->gedcom_id === null) : ?> 54 <?= I18N::translate('All') ?> 55 <?php else : ?> 56 <?= e($tree->title()) ?> 57 <?php endif ?> 58 </td> 59 <td> 60 <?= e($faq->header) ?> 61 </td> 62 <td> 63 <?php if ($faq->block_order != $min_block_order) : ?> 64 <form action="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminMoveUp', 'block_id' => $faq->block_id, 'ged' => $tree->name()])) ?>" method="post"> 65 <?= csrf_field() ?> 66 <button type="submit" class="btn btn-secondary"> 67 <?= view('icons/arrow-up') ?> 68 <?= I18N::translate('Move up') ?> 69 </button> 70 </form> 71 <?php endif ?> 72 </td> 73 <td> 74 <?php if ($faq->block_order != $max_block_order) : ?> 75 <form action="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminMoveDown', 'block_id' => $faq->block_id, 'ged' => $tree->name()])) ?>" method="post"> 76 <?= csrf_field() ?> 77 <button type="submit" class="btn btn-secondary"> 78 <?= view('icons/arrow-down') ?> 79 <?= I18N::translate('Move down') ?> 80 </button> 81 </form> 82 <?php endif ?> 83 </td> 84 <td> 85 <a href="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminEdit', 'block_id' => $faq->block_id, 'ged' => $tree->name()])) ?>" class="btn btn-primary"> 86 <?= view('icons/edit') ?> 87 <?= I18N::translate('Edit') ?> 88 </a> 89 </td> 90 <td> 91 <form action="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminDelete', 'block_id' => $faq->block_id, 'ged' => $tree->name()])) ?>" method="post"> 92 <?= csrf_field() ?> 93 <button type="submit" class="btn btn-danger" onclick="return confirm(this.dataset.confirm);" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($faq->header)) ?>"> 94 <?= view('icons/delete') ?> 95 <?= I18N::translate('delete') ?> 96 </button> 97 </form> 98 </td> 99 </tr> 100 <?php endforeach ?> 101 </tbody> 102</table> 103