Improve file attachments tooltip on the board

This commit is contained in:
Frederic Guillot 2015-08-23 11:09:14 -04:00
parent dd239ddb59
commit 1f2f5d2c10
3 changed files with 20 additions and 33 deletions

View File

@ -21,6 +21,7 @@ New features:
Improvements:
* Improve file attachments tooltip on the board
* Adjust automatically the height of the placeholder during drag and drop
* Show all tasks when using no search criteria
* Add column vertical scrolling

View File

@ -179,8 +179,7 @@ class Board extends Base
$task = $this->getTask();
$this->response->html($this->template->render('board/tooltip_files', array(
'files' => $this->file->getAllDocuments($task['id']),
'images' => $this->file->getAllImages($task['id']),
'files' => $this->file->getAll($task['id']),
'task' => $task,
)));
}

View File

@ -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>