summaryrefslogtreecommitdiff
path: root/app/Template/project_file
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-02-16 21:12:43 -0500
committerFrederic Guillot <fred@kanboard.net>2016-02-16 21:12:43 -0500
commit8936792f6f7a408dae7e0a6a41274202822acd9c (patch)
treea07a005ef7095472f7a64779df85825fe30a97b2 /app/Template/project_file
parent5bbc903dcab12dcf53abc40bf67c2cd7898e0420 (diff)
Add file attachements to projects
Diffstat (limited to 'app/Template/project_file')
-rw-r--r--app/Template/project_file/create.php33
-rw-r--r--app/Template/project_file/remove.php15
2 files changed, 48 insertions, 0 deletions
diff --git a/app/Template/project_file/create.php b/app/Template/project_file/create.php
new file mode 100644
index 00000000..67315285
--- /dev/null
+++ b/app/Template/project_file/create.php
@@ -0,0 +1,33 @@
+<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'), 'ProjectOverview', 'show', array('project_id' => $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('ProjectFile', 'save', array('project_id' => $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'), 'ProjectOverview', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
+</div>
diff --git a/app/Template/project_file/remove.php b/app/Template/project_file/remove.php
new file mode 100644
index 00000000..4f0ba465
--- /dev/null
+++ b/app/Template/project_file/remove.php
@@ -0,0 +1,15 @@
+<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'), 'ProjectFile', 'remove', array('project_id' => $project['id'], 'file_id' => $file['id']), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'ProjectOverview', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
+ </div>
+</div> \ No newline at end of file