summaryrefslogtreecommitdiff
path: root/app/Template/task_file/images.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/task_file/images.php')
-rw-r--r--app/Template/task_file/images.php26
1 files changed, 19 insertions, 7 deletions
diff --git a/app/Template/task_file/images.php b/app/Template/task_file/images.php
index 81c33151..9d20dea0 100644
--- a/app/Template/task_file/images.php
+++ b/app/Template/task_file/images.php
@@ -2,20 +2,28 @@
<div class="file-thumbnails">
<?php foreach ($images as $file): ?>
<div class="file-thumbnail">
- <a href="<?= $this->url->href('FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>" class="popover"><img src="<?= $this->url->href('FileViewerController', 'thumbnail', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" title="<?= $this->text->e($file['name']) ?>" alt="<?= $this->text->e($file['name']) ?>"></a>
+ <?= $this->app->component('image-slideshow', array(
+ 'images' => $images,
+ 'image' => $file,
+ 'regex' => 'FILE_ID',
+ 'url' => array(
+ 'image' => $this->url->to('FileViewerController', 'image', array('file_id' => 'FILE_ID', 'project_id' => $task['project_id'], 'task_id' => $task['id'])),
+ 'thumbnail' => $this->url->to('FileViewerController', 'thumbnail', array('file_id' => 'FILE_ID', 'project_id' => $task['project_id'], 'task_id' => $task['id'])),
+ 'download' => $this->url->to('FileViewerController', 'download', array('file_id' => 'FILE_ID', 'project_id' => $task['project_id'], 'task_id' => $task['id'])),
+ )
+ )) ?>
+
<div class="file-thumbnail-content">
<div class="file-thumbnail-title">
<div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
+ <a href="#" class="dropdown-menu dropdown-menu-link-text" title="<?= $this->text->e($file['name']) ?>"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
<ul>
<li>
- <i class="fa fa-download fa-fw"></i>
- <?= $this->url->link(t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
</li>
<?php if ($this->user->hasProjectAccess('TaskFileController', 'remove', $task['project_id'])): ?>
<li>
- <i class="fa fa-trash fa-fw"></i>
- <?= $this->url->link(t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>
+ <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
</li>
<?php endif ?>
</ul>
@@ -25,7 +33,11 @@
<span class="tooltip" title='<?= t('Uploaded: %s', $this->dt->datetime($file['date'])).'<br>'.t('Size: %s', $this->text->bytes($file['size'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
- <?= t('Uploaded by %s', $file['user_name'] ?: $file['username']) ?>
+ <?php if (! empty($file['user_id'])): ?>
+ <?= t('Uploaded by %s', $file['user_name'] ?: $file['username']) ?>
+ <?php else: ?>
+ <?= t('Uploaded: %s', $this->dt->datetime($file['date'])) ?>
+ <?php endif ?>
</div>
</div>
</div>