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