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