summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/project_overview/files.php5
-rw-r--r--app/Template/task_file/files.php5
2 files changed, 10 insertions, 0 deletions
diff --git a/app/Template/project_overview/files.php b/app/Template/project_overview/files.php
index 826e6325..1326a7d1 100644
--- a/app/Template/project_overview/files.php
+++ b/app/Template/project_overview/files.php
@@ -18,6 +18,11 @@
<i class="fa fa-eye fa-fw"></i>
<?= $this->url->link(t('View file'), 'FileViewerController', 'show', array('project_id' => $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('project_id' => $project['id'], 'file_id' => $file['id']), false, '', '', true) ?>
+ </li>
<?php endif ?>
<li>
<i class="fa fa-download fa-fw"></i>
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>