summaryrefslogtreecommitdiff
path: root/app/Template/file
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/file')
-rw-r--r--app/Template/file/new.php33
-rw-r--r--app/Template/file/open.php6
-rw-r--r--app/Template/file/remove.php15
-rw-r--r--app/Template/file/screenshot.php19
-rw-r--r--app/Template/file/show.php84
5 files changed, 0 insertions, 157 deletions
diff --git a/app/Template/file/new.php b/app/Template/file/new.php
deleted file mode 100644
index e84ef839..00000000
--- a/app/Template/file/new.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<div class="page-header">
- <h2><?= t('Attach a document') ?></h2>
-</div>
-<div id="file-done" style="display:none">
- <p class="alert alert-success">
- <?= t('All files have been uploaded successfully.') ?>
- <?= $this->url->link(t('View uploaded files'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </p>
-</div>
-
-<div id="file-error-max-size" style="display:none">
- <p class="alert alert-error">
- <?= t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)) ?>
- <a href="#" id="file-browser"><?= t('Choose files again') ?></a>
- </p>
-</div>
-
-<div
- id="file-dropzone"
- data-max-size="<?= $max_size ?>"
- data-url="<?= $this->url->href('file', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
- <div id="file-dropzone-inner">
- <?= t('Drag and drop your files here') ?> <?= t('or') ?> <a href="#" id="file-browser"><?= t('choose files') ?></a>
- </div>
-</div>
-
-<input type="file" name="files[]" multiple style="display:none" id="file-form-element">
-
-<div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue" id="file-upload-button" disabled>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
-</div>
diff --git a/app/Template/file/open.php b/app/Template/file/open.php
deleted file mode 100644
index 3df012b6..00000000
--- a/app/Template/file/open.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<div class="page-header">
- <h2><?= $this->e($file['name']) ?></h2>
- <div class="task-file-viewer">
- <img src="<?= $this->url->href('file', 'image', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/>
- </div>
-</div> \ No newline at end of file
diff --git a/app/Template/file/remove.php b/app/Template/file/remove.php
deleted file mode 100644
index 24844835..00000000
--- a/app/Template/file/remove.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<div class="page-header">
- <h2><?= t('Remove a file') ?></h2>
-</div>
-
-<div class="confirm">
- <p class="alert alert-info">
- <?= t('Do you really want to remove this file: "%s"?', $this->e($file['name'])) ?>
- </p>
-
- <div class="form-actions">
- <?= $this->url->link(t('Yes'), 'file', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), true, 'btn btn-red') ?>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
- </div>
-</div> \ No newline at end of file
diff --git a/app/Template/file/screenshot.php b/app/Template/file/screenshot.php
deleted file mode 100644
index 58b93ac3..00000000
--- a/app/Template/file/screenshot.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<div class="page-header">
- <h2><?= t('Add a screenshot') ?></h2>
-</div>
-
-<div id="screenshot-zone">
- <p id="screenshot-inner"><?= t('Take a screenshot and press CTRL+V or ⌘+V to paste here.') ?></p>
-</div>
-
-<form class="popover-form" action="<?= $this->url->href('file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post">
- <input type="hidden" name="screenshot"/>
- <?= $this->form->csrf() ?>
- <div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
- </div>
-</form>
-
-<p class="alert alert-info"><?= t('This feature does not work with all browsers.') ?></p> \ No newline at end of file
diff --git a/app/Template/file/show.php b/app/Template/file/show.php
deleted file mode 100644
index ed006299..00000000
--- a/app/Template/file/show.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?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)): ?>
- <div class="file-thumbnails">
- <?php foreach ($images as $file): ?>
- <div class="file-thumbnail">
- <a href="<?= $this->url->href('file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>" class="popover"><img src="<?= $this->url->href('file', 'thumbnail', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" title="<?= $this->e($file['name']) ?>" alt="<?= $this->e($file['name']) ?>"></a>
- <div class="file-thumbnail-content">
- <div class="file-thumbnail-title">
- <div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
- <ul>
- <?php if ($this->user->hasProjectAccess('file', 'remove', $task['project_id'])): ?>
- <li>
- <i class="fa fa-trash fa-fw"></i>
- <?= $this->url->link(t('Remove'), 'file', 'confirm', 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'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
- </li>
- </ul>
- </div>
- </div>
- <div class="file-thumbnail-description">
- <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']) ?>
- </div>
- </div>
- </div>
- <?php endforeach ?>
- </div>
- <?php endif ?>
-
- <?php if (! empty($files)): ?>
- <table class="table-stripped">
- <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->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
- <ul>
- <?php if ($this->user->hasProjectAccess('file', 'remove', $task['project_id'])): ?>
- <li>
- <i class="fa fa-trash fa-fw"></i>
- <?= $this->url->link(t('Remove'), 'file', 'confirm', 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'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
- </li>
- </ul>
- </div>
- </td>
- <td>
- <?= $this->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 ?>
-</div>
-<?php endif ?> \ No newline at end of file