xref: /webtrees/resources/views/modules/stories/tab.phtml (revision 71378461661e7642e52abe7d41c9cfffb3e5369b)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
4use Fisharebest\Webtrees\I18N;
5
6?>
7
8<div class="wt-tab-stories py-4">
9    <?php foreach ($stories as $story) : ?>
10        <div class="story_title descriptionbox text-center rela">
11            <?= e($story->title) ?>
12        </div>
13        <div class="story_body optionbox">
14            <?= $story->story_body ?>
15        </div>
16        <?php if ($is_admin) : ?>
17            <div class="story_edit">
18                <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'block_id' => $story->block_id, 'ged' => $tree->name()])) ?>">
19                    <?= I18N::translate('Edit the story') ?>
20                </a>
21            </div>
22        <?php endif ?>
23    <?php endforeach ?>
24
25    <?php if ($is_admin && empty($stories)) : ?>
26        <div>
27            <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'xref' => $individual->xref(), 'ged' => $tree->name()])) ?>">
28                <?= I18N::translate('Add a story') ?>
29            </a>
30        </div>
31    <?php endif ?>
32</div>
33