summaryrefslogtreecommitdiff
path: root/app/Template/file_viewer/show.php
blob: 191aaa6c8418ea95d72b53f6b81d25b7623fab64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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>