diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-12-19 22:27:13 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-12-19 22:27:13 -0500 |
commit | 07c44d2113ee2fe67d6bdaf0018b321b1a6ebc9f (patch) | |
tree | 0e71a12e86ffb65c1b4e8e39e752488c5f9968d2 /app/Template/task_file | |
parent | eed51aef63d55d8906f3f0e6c707ef1f1739d5ff (diff) |
Avoid code duplication in PR #2891
Diffstat (limited to 'app/Template/task_file')
-rw-r--r-- | app/Template/task_file/files.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Template/task_file/files.php b/app/Template/task_file/files.php index 94c26f73..32bebdcb 100644 --- a/app/Template/task_file/files.php +++ b/app/Template/task_file/files.php @@ -18,6 +18,11 @@ <i class="fa fa-eye fa-fw"></i> <?= $this->url->link(t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> </li> + <?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?> + <li> + <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) ?> + </li> <?php endif ?> <li> <i class="fa fa-download fa-fw"></i> |