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