2014-12-22 19:15:38 +01:00
|
|
|
<?php if (! empty($files)): ?>
|
|
|
|
<div id="attachments" class="task-show-section">
|
|
|
|
|
|
|
|
<div class="page-header">
|
|
|
|
<h2><?= t('Attachments') ?></h2>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<ul class="task-show-files">
|
|
|
|
<?php foreach ($files as $file): ?>
|
|
|
|
<li>
|
2015-01-16 14:23:05 +01:00
|
|
|
<?= $this->a($this->e($file['name']), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
|
2014-12-22 19:15:38 +01:00
|
|
|
<span class="task-show-file-actions">
|
|
|
|
<?php if ($file['is_image']): ?>
|
2015-01-16 14:23:05 +01:00
|
|
|
<?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'file-popover') ?>,
|
2014-12-22 19:15:38 +01:00
|
|
|
<?php endif ?>
|
2015-01-16 14:23:05 +01:00
|
|
|
<?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
|
2014-12-22 19:15:38 +01:00
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|