summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-20 20:26:21 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-20 20:26:21 -0500
commit11b6381cc0f0583a11287202463d20a0ac1ebf00 (patch)
treec973b6686467272ae56914f5e143d09de476d084 /app/Template
parentb84edaaf13ba854290099b0df452f61e9b595a17 (diff)
Move and clean some templates to a subfolder
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/config/about.php (renamed from app/Template/config_about.php)0
-rw-r--r--app/Template/config/api.php (renamed from app/Template/config_api.php)0
-rw-r--r--app/Template/config/application.php (renamed from app/Template/config_application.php)0
-rw-r--r--app/Template/config/board.php (renamed from app/Template/config_board.php)0
-rw-r--r--app/Template/config/layout.php (renamed from app/Template/config_layout.php)2
-rw-r--r--app/Template/config/sidebar.php (renamed from app/Template/config_sidebar.php)0
-rw-r--r--app/Template/config/webhook.php (renamed from app/Template/config_webhook.php)0
-rw-r--r--app/Template/file/new.php (renamed from app/Template/file_new.php)4
-rw-r--r--app/Template/file/open.php6
-rw-r--r--app/Template/file/remove.php15
-rw-r--r--app/Template/file/show.php23
-rw-r--r--app/Template/file_open.php6
-rw-r--r--app/Template/file_remove.php14
-rw-r--r--app/Template/file_show.php23
-rw-r--r--app/Template/task_show.php2
15 files changed, 48 insertions, 47 deletions
diff --git a/app/Template/config_about.php b/app/Template/config/about.php
index 3f34f802..3f34f802 100644
--- a/app/Template/config_about.php
+++ b/app/Template/config/about.php
diff --git a/app/Template/config_api.php b/app/Template/config/api.php
index 037ea08d..037ea08d 100644
--- a/app/Template/config_api.php
+++ b/app/Template/config/api.php
diff --git a/app/Template/config_application.php b/app/Template/config/application.php
index c92975bc..c92975bc 100644
--- a/app/Template/config_application.php
+++ b/app/Template/config/application.php
diff --git a/app/Template/config_board.php b/app/Template/config/board.php
index f260d084..f260d084 100644
--- a/app/Template/config_board.php
+++ b/app/Template/config/board.php
diff --git a/app/Template/config_layout.php b/app/Template/config/layout.php
index bafad6bb..e0ac2fa8 100644
--- a/app/Template/config_layout.php
+++ b/app/Template/config/layout.php
@@ -1,7 +1,7 @@
<section id="main">
<section class="sidebar-container" id="config-section">
- <?= Helper\template('config_sidebar') ?>
+ <?= Helper\template('config/sidebar') ?>
<div class="sidebar-content">
<?= $config_content_for_layout ?>
diff --git a/app/Template/config_sidebar.php b/app/Template/config/sidebar.php
index 5870ca81..5870ca81 100644
--- a/app/Template/config_sidebar.php
+++ b/app/Template/config/sidebar.php
diff --git a/app/Template/config_webhook.php b/app/Template/config/webhook.php
index 052a2a99..052a2a99 100644
--- a/app/Template/config_webhook.php
+++ b/app/Template/config/webhook.php
diff --git a/app/Template/file_new.php b/app/Template/file/new.php
index 7f7f1d1c..63c29f1d 100644
--- a/app/Template/file_new.php
+++ b/app/Template/file/new.php
@@ -2,13 +2,13 @@
<h2><?= t('Attach a document') ?></h2>
</div>
-<form action="?controller=file&amp;action=save&amp;task_id=<?= $task['id'] ?>" method="post" enctype="multipart/form-data">
+<form action="<?= Helper\u('file', 'save', array('task_id' => $task['id'])) ?>" method="post" enctype="multipart/form-data">
<?= Helper\form_csrf() ?>
<input type="file" name="files[]" multiple />
<div class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? Helper\format_bytes($max_size) : $max_size ?></div>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
+ <?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
</div>
</form> \ No newline at end of file
diff --git a/app/Template/file/open.php b/app/Template/file/open.php
new file mode 100644
index 00000000..6106e6f8
--- /dev/null
+++ b/app/Template/file/open.php
@@ -0,0 +1,6 @@
+<div class="page-header">
+ <h2><?= Helper\escape($file['name']) ?></h2>
+ <div class="task-file-viewer">
+ <img src="<?= Helper\u('file', 'image', array('file_id' => $file['id'], 'task_id' => $file['task_id'])) ?>" alt="<?= Helper\escape($file['name']) ?>"/>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/file/remove.php b/app/Template/file/remove.php
new file mode 100644
index 00000000..4f655e5a
--- /dev/null
+++ b/app/Template/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"?', Helper\escape($file['name'])) ?>
+ </p>
+
+ <div class="form-actions">
+ <?= Helper\a(t('Yes'), 'file', 'remove', array('task_id' => $task['id'], 'file_id' => $file['id']), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/file/show.php b/app/Template/file/show.php
new file mode 100644
index 00000000..92a7c100
--- /dev/null
+++ b/app/Template/file/show.php
@@ -0,0 +1,23 @@
+<?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>
+ <?= Helper\a(Helper\escape($file['name']), 'file', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
+ <span class="task-show-file-actions">
+ <?php if ($file['is_image']): ?>
+ <?= Helper\a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'file_id' => $file['id']), false, 'file-popover') ?>,
+ <?php endif ?>
+ <?= Helper\a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
+ </span>
+ </li>
+ <?php endforeach ?>
+ </ul>
+
+</div>
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/file_open.php b/app/Template/file_open.php
deleted file mode 100644
index aa181d64..00000000
--- a/app/Template/file_open.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<div class="page-header">
- <h2><?= Helper\escape($file['name']) ?></h2>
- <div class="task-file-viewer">
- <img src="?controller=file&amp;action=image&amp;file_id=<?= $file['id'] ?>&amp;task_id=<?= $file['task_id'] ?>" alt="<?= Helper\escape($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 af77591c..00000000
--- a/app/Template/file_remove.php
+++ /dev/null
@@ -1,14 +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"?', Helper\escape($file['name'])) ?>
- </p>
-
- <div class="form-actions">
- <a href="?controller=file&amp;action=remove&amp;task_id=<?= $task['id'] ?>&amp;file_id=<?= $file['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a>
- <?= t('or') ?> <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
- </div>
-</div> \ 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 3832a0f5..00000000
--- a/app/Template/file_show.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?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>
- <a href="?controller=file&amp;action=download&amp;file_id=<?= $file['id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= Helper\escape($file['name']) ?></a>
- <span class="task-show-file-actions">
- <?php if ($file['is_image']): ?>
- <a href="?controller=file&amp;action=open&amp;file_id=<?= $file['id'] ?>&amp;task_id=<?= $task['id'] ?>" class="file-popover"><?= t('open') ?></a>,
- <?php endif ?>
- <a href="?controller=file&amp;action=confirm&amp;file_id=<?= $file['id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= t('remove') ?></a>
- </span>
- </li>
- <?php endforeach ?>
- </ul>
-
-</div>
-<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task_show.php b/app/Template/task_show.php
index ec5d5da4..a4b49cef 100644
--- a/app/Template/task_show.php
+++ b/app/Template/task_show.php
@@ -3,5 +3,5 @@
<?= Helper\template('task_show_description', array('task' => $task)) ?>
<?= Helper\template('subtask_show', array('task' => $task, 'subtasks' => $subtasks)) ?>
<?= Helper\template('task_timesheet', array('timesheet' => $timesheet)) ?>
-<?= Helper\template('file_show', array('task' => $task, 'files' => $files)) ?>
+<?= Helper\template('file/show', array('task' => $task, 'files' => $files)) ?>
<?= Helper\template('task_comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?> \ No newline at end of file