From c60d642a1a9976e7d43e8711784533abeb74a07f Mon Sep 17 00:00:00 2001 From: Rafael de Camargo Date: Wed, 22 May 2019 10:32:36 -0300 Subject: Add View File on popover to tooltip Merged this if with the if used on template:task_file:files --- app/Template/board/tooltip_files.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/Template') diff --git a/app/Template/board/tooltip_files.php b/app/Template/board/tooltip_files.php index 390139eb..5cd9b004 100644 --- a/app/Template/board/tooltip_files.php +++ b/app/Template/board/tooltip_files.php @@ -10,9 +10,12 @@ url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> - + file->getPreviewType($file['name']) !== null || $file['is_image'] == 1): ?>  modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> -  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) ?> +  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) ?> + file->getBrowserViewType($file['name']) !== null): ?> + + url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?> -- cgit v1.2.3