summaryrefslogtreecommitdiff
path: root/resources/views/modules/stories/tab.php
diff options
context:
space:
mode:
Diffstat (limited to 'resources/views/modules/stories/tab.php')
-rw-r--r--resources/views/modules/stories/tab.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/resources/views/modules/stories/tab.php b/resources/views/modules/stories/tab.php
new file mode 100644
index 0000000000..3345282c0f
--- /dev/null
+++ b/resources/views/modules/stories/tab.php
@@ -0,0 +1,28 @@
+<?php use Fisharebest\Webtrees\Html; ?>
+<?php use Fisharebest\Webtrees\I18N; ?>
+
+<div class="wt-stories-tab py-4">
+ <?php foreach ($stories as $story): ?>
+ <div class="story_title descriptionbox center rela">
+ <?= e($story->title) ?>
+ </div>
+ <div class="story_body optionbox">
+ <?= $story->story_body ?>
+ </div>
+ <?php if ($is_admin): ?>
+ <div class="story_edit">
+ <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'block_id' => $story->block_id, 'ged' => $tree->getName()])) ?>">
+ <?= I18N::translate('Edit the story') ?>
+ </a>
+ </div>
+ <?php endif ?>
+ <?php endforeach ?>
+
+ <?php if ($is_admin && empty($stories)): ?>
+ <div>
+ <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'xref' => $individual->getXref(), 'ged' => $tree->getName()])) ?>">
+ <?= I18N::translate('Add a story') ?>
+ </a>
+ </div>
+ <?php endif ?>
+</div>