diff options
author | BlueTeck <tili2@gmx.de> | 2015-03-07 11:31:53 +0100 |
---|---|---|
committer | BlueTeck <tili2@gmx.de> | 2015-03-07 11:31:53 +0100 |
commit | 5e5af86638d301658d3910b94c68e8a35f676c00 (patch) | |
tree | 157242e063b1b986699a1f9a430601bad9b5ded3 /app/Template/file/show.php | |
parent | 88ba0c0953395e18dbdd871e96831d885f59740c (diff) |
add image thumbnail to task detail view, add icons to common file extensions, better layout in task attachments
Diffstat (limited to 'app/Template/file/show.php')
-rw-r--r-- | app/Template/file/show.php | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/app/Template/file/show.php b/app/Template/file/show.php index 2af5a7aa..0f5bd4ee 100644 --- a/app/Template/file/show.php +++ b/app/Template/file/show.php @@ -12,7 +12,7 @@ <?php foreach ($images as $file): ?> <li> <div class="img_container"> - <img src="<?= $this->u('file', 'image', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/> + <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']) ?> @@ -31,17 +31,20 @@ <h3> <?= t('Files') ?> </h3> - <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"> - <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'])) ?> - </span> - </li> - <?php endforeach ?> - </ul> - + <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 ?> |