Add View File on popover to tooltip

Merged this if with the if used on template:task_file:files
This commit is contained in:
Rafael de Camargo 2019-05-22 10:32:36 -03:00 committed by fguillot
parent 96dd20c0cd
commit c60d642a1a
1 changed files with 5 additions and 2 deletions

View File

@ -10,9 +10,12 @@
<tr>
<td>
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
<?php if ($file['is_image'] == 1): ?>
<?php if ($this->file->getPreviewType($file['name']) !== null || $file['is_image'] == 1): ?>
&nbsp;<?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
&nbsp;<?= $this->url->icon('external-link', t('View file'), 'FileViewerController', 'image', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?>
&nbsp;<?= $this->url->icon('external-link', t('View file'), 'FileViewerController', ($file['is_image'] == 1 ? 'image' : 'show'), array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?>
<?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?>
<i class="fa fa-eye fa-fw"></i>
<?= $this->url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?>
<?php endif ?>
</td>
</tr>