summaryrefslogtreecommitdiff
path: root/app/Template/board/files.php
diff options
context:
space:
mode:
authorBlueTeck <tili2@gmx.de>2015-03-07 11:31:53 +0100
committerBlueTeck <tili2@gmx.de>2015-03-07 11:31:53 +0100
commit5e5af86638d301658d3910b94c68e8a35f676c00 (patch)
tree157242e063b1b986699a1f9a430601bad9b5ded3 /app/Template/board/files.php
parent88ba0c0953395e18dbdd871e96831d885f59740c (diff)
add image thumbnail to task detail view, add icons to common file extensions, better layout in task attachments
Diffstat (limited to 'app/Template/board/files.php')
-rw-r--r--app/Template/board/files.php43
1 files changed, 31 insertions, 12 deletions
diff --git a/app/Template/board/files.php b/app/Template/board/files.php
index 278b906b..61529434 100644
--- a/app/Template/board/files.php
+++ b/app/Template/board/files.php
@@ -1,14 +1,33 @@
<section>
- <?php foreach ($files as $file): ?>
- <i class="fa fa-file-o fa-fw"></i>
-
- <?= $this->a(
- $this->e($file['name']),
- 'file',
- 'download',
- array('file_id' => $file['id'], 'task_id' => $file['task_id'], 'project_id' => $task['project_id'])
- ) ?>
-
- <br/>
- <?php endforeach ?>
+ <table>
+ <?php if (!empty($images)): ?>
+ <?php foreach ($images as $file): ?>
+ <tr>
+ <td><i class="fa fa-file-image-o fa-fw"></i>
+ <?=
+ $this->e($file['name'])
+ ?>
+ </td>
+ <td>
+ <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'])) ?>
+ <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') ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+ <?php endif ?>
+ <?php if (!empty($files)): ?>
+ <?php foreach ($files as $file): ?>
+ <tr>
+ <td><i class="fa <?= $this->file->get_icon($file['name']) ?> fa-fw"></i>
+ <?=
+ $this->e($file['name'])
+ ?>
+ </td>
+ <td>
+ <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'])) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+ <?php endif ?>
+ </table>
</section>