summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-23 11:09:14 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-23 11:09:14 -0400
commit1f2f5d2c102b65abf44eeaa9b7864566a409ff80 (patch)
tree2347541e647807db178e5b1610382801f1272cf1 /app/Template
parentdd239ddb5900fd4e0599f57d834c1aa409bd6d77 (diff)
Improve file attachments tooltip on the board
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/board/tooltip_files.php49
1 files changed, 18 insertions, 31 deletions
diff --git a/app/Template/board/tooltip_files.php b/app/Template/board/tooltip_files.php
index 70e3d371..96428d3b 100644
--- a/app/Template/board/tooltip_files.php
+++ b/app/Template/board/tooltip_files.php
@@ -1,31 +1,18 @@
-<section>
- <table>
- <?php if (! empty($images)): ?>
- <?php foreach ($images as $file): ?>
- <tr>
- <td class="column-70">
- <i class="fa fa-file-image-o fa-fw"></i>
- <?= $this->e($file['name']) ?>
- </td>
- <td>
- <i class="fa fa-download"></i> <?= $this->url->link(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->url->link(t('open file'), '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->icon($file['name']) ?> fa-fw"></i>
- <?= $this->e($file['name']) ?>
- </td>
- <td>
- <i class="fa fa-download"></i> <?= $this->url->link(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>
+<table class="table-small">
+ <?php foreach($files as $file): ?>
+ <tr>
+ <th>
+ <i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i>
+ <?= $this->e($file['name']) ?>
+ </th>
+ </tr>
+ <tr>
+ <td>
+ <i class="fa fa-download fa-fw"></i><?= $this->url->link(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <?php if ($file['is_image'] == 1): ?>
+ &nbsp;<i class="fa fa-eye"></i> <?= $this->url->link(t('open file'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>
+ <?php endif ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table> \ No newline at end of file