![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/webtrees/resources/views/modules/stories/ |
Upload File : |
<?php declare(strict_types=1); use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllPage; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Tree; use Illuminate\Support\Collection; /** * @var Collection<int,object> $stories * @var string $title * @var Tree $tree * @var array<string> $tree_names */ ?> <?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ModulesAllPage::class) => I18N::translate('Modules'), $title]]) ?> <h1><?= $title ?></h1> <form method="post" class="row"> <div class="col-auto"> <div class="input-group"> <?= view('components/select', ['name' => 'tree', 'selected' => $tree->name(), 'options' => $tree_names, 'aria_label' => I18N::translate('Family tree')]) ?> <input type="submit" class="btn btn-primary" value="<?= I18N::translate('show') ?>"> </div> </div> <?= csrf_field() ?> </form> <p> <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'tree' => $tree->name()])) ?>" class="btn btn-link"> <?= view('icons/add') ?> <?= I18N::translate('Add a story') ?> </a> </p> <table class="table table-bordered table-sm datatables d-none" <?= view('lists/datatables-attributes') ?> data-columns="<?= e(json_encode([ null, null, ['sortable' => false], ['sortable' => false], ], JSON_THROW_ON_ERROR)) ?>" > <caption> <?= I18N::translate('Stories') ?> </caption> <thead> <tr> <th><?= I18N::translate('Individual') ?></th> <th><?= I18N::translate('Story title') ?></th> <th><?= I18N::translate('Edit') ?></th> <th><?= I18N::translate('Delete') ?></th> </tr> </thead> <tbody> <?php foreach ($stories as $story) : ?> <tr> <td> <?php if ($story->individual !== null) : ?> <a href="<?= e($story->individual->url()) ?>#tab-stories"> <?= $story->individual->fullName() ?> </a> <?php else : ?> <?= $story->xref ?> <?php endif ?> </td> <td> <?= e($story->title) ?> </td> <td> <a class="btn btn-primary" href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'tree' => $tree->name(), 'block_id' => $story->block_id])) ?>" aria-label="<?= I18N::translate('Edit') ?>"> <?= view('icons/edit') ?> <?= I18N::translate('Edit') ?> </a> </td> <td> <form method="post" action="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminDelete', 'tree' => $tree->name(), 'block_id' => $story->block_id])) ?>"> <button type="submit" class="btn btn-danger" data-wt-confirm="<?= I18N::translate('Are you sure you want to delete ā%sā?', e($story->title)) ?>" aria-label="<?= I18N::translate('Delete') ?>"> <?= view('icons/delete') ?> <?= I18N::translate('Delete') ?> </button> <?= csrf_field() ?> </form> </td> </tr> <?php endforeach ?> </tbody> </table>