diff options
Diffstat (limited to 'app/Template/file_viewer/show.php')
-rw-r--r-- | app/Template/file_viewer/show.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/Template/file_viewer/show.php b/app/Template/file_viewer/show.php new file mode 100644 index 00000000..191aaa6c --- /dev/null +++ b/app/Template/file_viewer/show.php @@ -0,0 +1,14 @@ +<div class="page-header"> + <h2><?= $this->text->e($file['name']) ?></h2> +</div> +<div class="file-viewer"> + <?php if ($file['is_image']): ?> + <img src="<?= $this->url->href('FileViewer', 'image', $params) ?>" alt="<?= $this->text->e($file['name']) ?>"> + <?php elseif ($type === 'markdown'): ?> + <article class="markdown"> + <?= $this->text->markdown($content) ?> + </article> + <?php elseif ($type === 'text'): ?> + <pre><?= $content ?></pre> + <?php endif ?> +</div>
\ No newline at end of file |