xref: /webtrees/resources/views/modules/stories/tab.phtml (revision 37231d1e839cad24e911f38c73f4dc77a58e3eec)
1<?php use Fisharebest\Webtrees\I18N; ?>
2
3<div class="wt-stories-tab py-4">
4    <?php foreach ($stories as $story) : ?>
5        <div class="story_title descriptionbox 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->getName()])) ?>">
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->getXref(), 'ged' => $tree->getName()])) ?>">
23                <?= I18N::translate('Add a story') ?>
24            </a>
25        </div>
26    <?php endif ?>
27</div>
28