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