summaryrefslogtreecommitdiff
path: root/app/Template/file/show.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-03-10 22:11:30 -0400
committerFrederic Guillot <fred@kanboard.net>2015-03-10 22:11:30 -0400
commit788ef2bc07206c676a8ad3f1e27aed9669c703ff (patch)
treedd3b84194fdb6db7911f036637cce67f47858a65 /app/Template/file/show.php
parent900e3fa1fd0a41e1617cd42a83b34d4c39d1730f (diff)
parent5e5af86638d301658d3910b94c68e8a35f676c00 (diff)
Merge pull-request #699
Diffstat (limited to 'app/Template/file/show.php')
-rw-r--r--app/Template/file/show.php73
1 files changed, 53 insertions, 20 deletions
diff --git a/app/Template/file/show.php b/app/Template/file/show.php
index 298976f6..0f5bd4ee 100644
--- a/app/Template/file/show.php
+++ b/app/Template/file/show.php
@@ -1,23 +1,56 @@
-<?php if (! empty($files)): ?>
-<div id="attachments" class="task-show-section">
+<?php if (!empty($files) || !empty($images)): ?>
+ <div id="attachments" class="task-show-section">
- <div class="page-header">
- <h2><?= t('Attachments') ?></h2>
- </div>
+ <div class="page-header">
+ <h2><?= t('Attachments') ?></h2>
+ </div>
+ <?php if (!empty($images)): ?>
+ <h3>
+ <?= t('Images') ?>
+ </h3>
+ <ul class="task-show-images">
+ <?php foreach ($images as $file): ?>
+ <li>
+ <div class="img_container">
+ <img src="<?= $this->u('file', 'imageThumbnail', array('width' => 250, 'file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/>
+ </div>
+ <p>
+ <?= $this->e($file['name']) ?>
+ </p>
+ <span class="task-show-file-actions task-show-image-actions">
+ <i class="fa fa-eye"></i> <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>
+ <i class="fa fa-trash"></i> <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ </span>
+ </li>
+ <?php endforeach ?>
+ </ul>
+ <?php endif
+ ?>
+ <?php if (!empty($files)): ?>
+ <h3>
+ <?= t('Files') ?>
+ </h3>
+ <table class="task-show-file-table">
+ <?php foreach ($files as $file): ?>
+ <tr>
+ <td><i class="fa <?= $this->file->get_icon($file['name']) ?> fa-fw"></i></td>
+ <td>
+ <?= $this->e($file['name']) ?>
+ </td><td>
+ <span class="task-show-file-actions">
+ <i class="fa fa-trash"></i> <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ </span>
+ </td></tr>
+ <?php endforeach ?>
+ </table>
+ </div>
+ <?php endif
+ ?>
+ <?php
- <ul class="task-show-files">
- <?php foreach ($files as $file): ?>
- <li>
- <?= $this->a($this->e($file['name']), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
- <span class="task-show-file-actions">
- <?php if ($file['is_image']): ?>
- <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>,
- <?php endif ?>
- <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
- </span>
- </li>
- <?php endforeach ?>
- </ul>
-</div>
-<?php endif ?> \ No newline at end of file
+
+
+ endif ?> \ No newline at end of file