1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Bootstrap4; ?> 2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?> 3dd6b2bfcSGreg Roach 40cb66f86SGreg Roach<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('Modules'), $title]]) ?> 5dd6b2bfcSGreg Roach 6dd6b2bfcSGreg Roach<h1><?= $title ?></h1> 7dd6b2bfcSGreg Roach 8dd6b2bfcSGreg Roach<form class="form-inline mb-4"> 9dd6b2bfcSGreg Roach <input type="hidden" name="route" value="module"> 10dd6b2bfcSGreg Roach <input type="hidden" name="module" value="stories"> 11dd6b2bfcSGreg Roach <input type="hidden" name="action" value="Admin"> 12dd6b2bfcSGreg Roach 13dd6b2bfcSGreg Roach <label for="ged" class="sr-only"> 14dd6b2bfcSGreg Roach <?= I18N::translate('Family tree') ?> 15dd6b2bfcSGreg Roach </label> 16dd6b2bfcSGreg Roach 17aa6f03bbSGreg Roach <?= Bootstrap4::select($tree_names, $tree->name(), ['id' => 'ged', 'name' => 'ged']) ?> 18dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary"> 19dd6b2bfcSGreg Roach <?= I18N::translate('show') ?> 20dd6b2bfcSGreg Roach </button> 21dd6b2bfcSGreg Roach</form> 22dd6b2bfcSGreg Roach 23dd6b2bfcSGreg Roach<p> 24aa6f03bbSGreg Roach <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'ged' => $tree->name()])) ?>" class="btn btn-link"> 25dd6b2bfcSGreg Roach <?= view('icons/add') ?> 26dd6b2bfcSGreg Roach <?= I18N::translate('Add a story') ?> 27dd6b2bfcSGreg Roach </a> 28dd6b2bfcSGreg Roach</p> 29dd6b2bfcSGreg Roach 30dd6b2bfcSGreg Roach<table class="table table-bordered table-sm"> 31dd6b2bfcSGreg Roach <thead> 32dd6b2bfcSGreg Roach <tr> 33dd6b2bfcSGreg Roach <th><?= I18N::translate('Individual') ?></th> 34dd6b2bfcSGreg Roach <th><?= I18N::translate('Story title') ?></th> 35dd6b2bfcSGreg Roach <th><?= I18N::translate('Edit') ?></th> 36dd6b2bfcSGreg Roach <th><?= I18N::translate('Delete') ?></th> 37dd6b2bfcSGreg Roach </tr> 38dd6b2bfcSGreg Roach </thead> 39dd6b2bfcSGreg Roach <tbody> 40dd6b2bfcSGreg Roach <?php foreach ($stories as $story) : ?> 41dd6b2bfcSGreg Roach <tr> 42dd6b2bfcSGreg Roach <td> 43dd6b2bfcSGreg Roach <?php if ($story->individual !== null) : ?> 44dd6b2bfcSGreg Roach <a href="<?= e($story->individual->url()) ?>#tab-stories"> 45*39ca88baSGreg Roach <?= $story->individual->fullName() ?> 46dd6b2bfcSGreg Roach </a> 47dd6b2bfcSGreg Roach <?php else : ?> 48dd6b2bfcSGreg Roach <?= $story->xref ?> 49dd6b2bfcSGreg Roach <?php endif ?> 50dd6b2bfcSGreg Roach </td> 51dd6b2bfcSGreg Roach <td> 52dd6b2bfcSGreg Roach <?= e($story->title) ?> 53dd6b2bfcSGreg Roach </td> 54dd6b2bfcSGreg Roach <td> 55aa6f03bbSGreg Roach <a class="btn btn-primary" href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'ged' => $tree->name(), 'block_id' => $story->block_id])) ?>"> 56dd6b2bfcSGreg Roach <?= view('icons/edit') ?> 57dd6b2bfcSGreg Roach <?= I18N::translate('Edit') ?> 58dd6b2bfcSGreg Roach </a> 59dd6b2bfcSGreg Roach </td> 60dd6b2bfcSGreg Roach <td> 61aa6f03bbSGreg Roach <form action="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminDelete', 'ged' => $tree->name(), 'block_id' => $story->block_id])) ?>" method="post"> 62dd6b2bfcSGreg Roach <?= csrf_field() ?> 63dd6b2bfcSGreg Roach <button type="submit" class="btn btn-danger" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($story->title)) ?>" onclick="return confirm(this.dataset.confirm);"> 64dd6b2bfcSGreg Roach <?= view('icons/delete') ?> 65dd6b2bfcSGreg Roach <?= I18N::translate('Delete') ?> 66dd6b2bfcSGreg Roach </button> 67dd6b2bfcSGreg Roach </form> 68dd6b2bfcSGreg Roach </td> 69dd6b2bfcSGreg Roach </tr> 70dd6b2bfcSGreg Roach <?php endforeach ?> 71dd6b2bfcSGreg Roach </tbody> 72dd6b2bfcSGreg Roach</table> 73