diff options
Diffstat (limited to 'app/Template/task_file/files.php')
-rw-r--r-- | app/Template/task_file/files.php | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/app/Template/task_file/files.php b/app/Template/task_file/files.php new file mode 100644 index 00000000..5603014e --- /dev/null +++ b/app/Template/task_file/files.php @@ -0,0 +1,47 @@ +<?php if (! empty($files)): ?> + <table class="table-stripped table-small"> + <tr> + <th><?= t('Filename') ?></th> + <th><?= t('Creator') ?></th> + <th><?= t('Date') ?></th> + <th><?= t('Size') ?></th> + </tr> + <?php foreach ($files as $file): ?> + <tr> + <td> + <i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i> + <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> + <ul> + <?php if ($this->file->getPreviewType($file['name']) !== null): ?> + <li> + <i class="fa fa-eye fa-fw"></i> + <?= $this->url->link(t('View file'), 'FileViewer', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + </li> + <?php endif ?> + <li> + <i class="fa fa-download fa-fw"></i> + <?= $this->url->link(t('Download'), 'FileViewer', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> + </li> + <?php if ($this->user->hasProjectAccess('TaskFile', 'remove', $task['project_id'])): ?> + <li> + <i class="fa fa-trash fa-fw"></i> + <?= $this->url->link(t('Remove'), 'TaskFile', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + </li> + <?php endif ?> + </ul> + </div> + </td> + <td> + <?= $this->text->e($file['user_name'] ?: $file['username']) ?> + </td> + <td> + <?= $this->dt->date($file['date']) ?> + </td> + <td> + <?= $this->text->bytes($file['size']) ?> + </td> + </tr> + <?php endforeach ?> + </table> +<?php endif ?>
\ No newline at end of file |