xref: /webtrees/resources/views/modules/stories/tab.phtml (revision 9b5537c37ce2b6d3b5c1a28c56f73d7ff9b9355c)
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->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