diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/board/files.php | 20 | ||||
-rw-r--r-- | app/Template/file/show.php | 96 |
2 files changed, 53 insertions, 63 deletions
diff --git a/app/Template/board/files.php b/app/Template/board/files.php index 61529434..851a118d 100644 --- a/app/Template/board/files.php +++ b/app/Template/board/files.php @@ -1,27 +1,25 @@ <section> <table> - <?php if (!empty($images)): ?> + <?php if (! empty($images)): ?> <?php foreach ($images as $file): ?> <tr> - <td><i class="fa fa-file-image-o fa-fw"></i> - <?= - $this->e($file['name']) - ?> + <td class="column-70"> + <i class="fa fa-file-image-o fa-fw"></i> + <?= $this->e($file['name']) ?> </td> <td> <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> - <i class="fa fa-eye"></i> <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + <i class="fa fa-eye"></i> <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> </td> </tr> <?php endforeach ?> <?php endif ?> - <?php if (!empty($files)): ?> + <?php if (! empty($files)): ?> <?php foreach ($files as $file): ?> <tr> - <td><i class="fa <?= $this->file->get_icon($file['name']) ?> fa-fw"></i> - <?= - $this->e($file['name']) - ?> + <td> + <i class="fa <?= $this->getFileIcon($file['name']) ?> fa-fw"></i> + <?= $this->e($file['name']) ?> </td> <td> <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> diff --git a/app/Template/file/show.php b/app/Template/file/show.php index 0f5bd4ee..b181ab54 100644 --- a/app/Template/file/show.php +++ b/app/Template/file/show.php @@ -1,56 +1,48 @@ -<?php if (!empty($files) || !empty($images)): ?> - <div id="attachments" class="task-show-section"> +<?php if (! empty($files) || ! empty($images)): ?> +<div id="attachments" class="task-show-section"> - <div class="page-header"> - <h2><?= t('Attachments') ?></h2> - </div> - <?php if (!empty($images)): ?> - <h3> - <?= t('Images') ?> - </h3> - <ul class="task-show-images"> - <?php foreach ($images as $file): ?> - <li> - <div class="img_container"> - <img src="<?= $this->u('file', 'imageThumbnail', array('width' => 250, 'file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/> - </div> - <p> - <?= $this->e($file['name']) ?> - </p> - <span class="task-show-file-actions task-show-image-actions"> - <i class="fa fa-eye"></i> <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + <div class="page-header"> + <h2><?= t('Attachments') ?></h2> + </div> + <?php if (!empty($images)): ?> + <h3><?= t('Images') ?></h3> + <ul class="task-show-images"> + <?php foreach ($images as $file): ?> + <li> + <div class="img_container"> + <img src="<?= $this->u('file', 'thumbnail', array('width' => 250, 'file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/> + </div> + <p> + <?= $this->e($file['name']) ?> + </p> + <span class="task-show-file-actions task-show-image-actions"> + <i class="fa fa-eye"></i> <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + <i class="fa fa-trash"></i> <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> + <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> + </span> + </li> + <?php endforeach ?> + </ul> + <?php endif ?> + + <?php if (! empty($files)): ?> + <h3><?= t('Files') ?></h3> + <table class="task-show-file-table"> + <?php foreach ($files as $file): ?> + <tr> + <td><i class="fa <?= $this->getFileIcon($file['name']) ?> fa-fw"></i></td> + <td> + <?= $this->e($file['name']) ?> + </td> + <td> + <span class="task-show-file-actions"> <i class="fa fa-trash"></i> <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> </span> - </li> - <?php endforeach ?> - </ul> - <?php endif - ?> - <?php if (!empty($files)): ?> - <h3> - <?= t('Files') ?> - </h3> - <table class="task-show-file-table"> - <?php foreach ($files as $file): ?> - <tr> - <td><i class="fa <?= $this->file->get_icon($file['name']) ?> fa-fw"></i></td> - <td> - <?= $this->e($file['name']) ?> - </td><td> - <span class="task-show-file-actions"> - <i class="fa fa-trash"></i> <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> - <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> - </span> - </td></tr> - <?php endforeach ?> - </table> - </div> - <?php endif - ?> - <?php - - - - - endif ?>
\ No newline at end of file + </td> + </tr> + <?php endforeach ?> + </table> + <?php endif ?> +</div> +<?php endif ?>
\ No newline at end of file |