summaryrefslogtreecommitdiff
path: root/app/Template/task
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/task')
-rw-r--r--app/Template/task/close.php15
-rw-r--r--app/Template/task/comments.php29
-rw-r--r--app/Template/task/details.php83
-rw-r--r--app/Template/task/duplicate.php15
-rw-r--r--app/Template/task/duplicate_project.php24
-rw-r--r--app/Template/task/edit.php68
-rw-r--r--app/Template/task/edit_description.php38
-rw-r--r--app/Template/task/layout.php15
-rw-r--r--app/Template/task/move_project.php24
-rw-r--r--app/Template/task/new.php79
-rw-r--r--app/Template/task/open.php15
-rw-r--r--app/Template/task/public.php27
-rw-r--r--app/Template/task/remove.php15
-rw-r--r--app/Template/task/show.php7
-rw-r--r--app/Template/task/show_description.php24
-rw-r--r--app/Template/task/sidebar.php44
-rw-r--r--app/Template/task/table.php56
-rw-r--r--app/Template/task/time.php15
-rw-r--r--app/Template/task/timesheet.php13
19 files changed, 606 insertions, 0 deletions
diff --git a/app/Template/task/close.php b/app/Template/task/close.php
new file mode 100644
index 00000000..062d0a88
--- /dev/null
+++ b/app/Template/task/close.php
@@ -0,0 +1,15 @@
+<div class="page-header">
+ <h2><?= t('Close a task') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info">
+ <?= t('Do you really want to close this task: "%s"?', Helper\escape($task['title'])) ?>
+ </p>
+
+ <div class="form-actions">
+ <?= Helper\a(t('Yes'), 'task', 'close', array('task_id' => $task['id'], 'confirmation' => 'yes'), 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/task/comments.php b/app/Template/task/comments.php
new file mode 100644
index 00000000..343e66c5
--- /dev/null
+++ b/app/Template/task/comments.php
@@ -0,0 +1,29 @@
+<?php if (! empty($comments)): ?>
+<div id="comments" class="task-show-section">
+ <div class="page-header">
+ <h2><?= t('Comments') ?></h2>
+ </div>
+
+ <?php foreach ($comments as $comment): ?>
+ <?= Helper\template('comment/show', array(
+ 'comment' => $comment,
+ 'task' => $task,
+ 'project' => $project,
+ 'not_editable' => isset($not_editable) && $not_editable,
+ 'is_public' => isset($is_public) && $is_public,
+ )) ?>
+ <?php endforeach ?>
+
+ <?php if (! isset($not_editable)): ?>
+ <?= Helper\template('comment/create', array(
+ 'skip_cancel' => true,
+ 'values' => array(
+ 'user_id' => Helper\get_user_id(),
+ 'task_id' => $task['id'],
+ ),
+ 'errors' => array(),
+ 'task' => $task
+ )) ?>
+ <?php endif ?>
+</div>
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/details.php b/app/Template/task/details.php
new file mode 100644
index 00000000..b5111f78
--- /dev/null
+++ b/app/Template/task/details.php
@@ -0,0 +1,83 @@
+<div class="task-<?= $task['color_id'] ?> task-show-details">
+ <h2><?= Helper\escape('#'.$task['id'].' '.$task['title']) ?></h2>
+ <?php if ($task['score']): ?>
+ <span class="task-score"><?= Helper\escape($task['score']) ?></span>
+ <?php endif ?>
+ <ul>
+ <?php if ($task['reference']): ?>
+ <li>
+ <strong><?= t('Reference: %s', $task['reference']) ?></strong>
+ </li>
+ <?php endif ?>
+ <li>
+ <?= dt('Created on %B %e, %Y at %k:%M %p', $task['date_creation']) ?>
+ </li>
+ <?php if ($task['date_modification']): ?>
+ <li>
+ <?= dt('Last modified on %B %e, %Y at %k:%M %p', $task['date_modification']) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($task['date_completed']): ?>
+ <li>
+ <?= dt('Completed on %B %e, %Y at %k:%M %p', $task['date_completed']) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($task['date_started']): ?>
+ <li>
+ <?= dt('Started on %B %e, %Y', $task['date_started']) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($task['date_due']): ?>
+ <li>
+ <strong><?= dt('Must be done before %B %e, %Y', $task['date_due']) ?></strong>
+ </li>
+ <?php endif ?>
+ <?php if ($task['time_estimated']): ?>
+ <li>
+ <?= t('Estimated time: %s hours', $task['time_estimated']) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($task['time_spent']): ?>
+ <li>
+ <?= t('Time spent: %s hours', $task['time_spent']) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($task['creator_username']): ?>
+ <li>
+ <?= t('Created by %s', $task['creator_name'] ?: $task['creator_username']) ?>
+ </li>
+ <?php endif ?>
+ <li>
+ <strong>
+ <?php if ($task['assignee_username']): ?>
+ <?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?php else: ?>
+ <?= t('There is nobody assigned') ?>
+ <?php endif ?>
+ </strong>
+ </li>
+ <li>
+ <?= t('Column on the board:') ?>
+ <strong><?= Helper\escape($task['column_title']) ?></strong>
+ (<?= Helper\escape($task['project_name']) ?>)
+ </li>
+ <li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li>
+ <?php if ($task['category_name']): ?>
+ <li>
+ <?= t('Category:') ?> <strong><?= Helper\escape($task['category_name']) ?></strong>
+ </li>
+ <?php endif ?>
+ <li>
+ <?php if ($task['is_active'] == 1): ?>
+ <?= t('Status is open') ?>
+ <?php else: ?>
+ <?= t('Status is closed') ?>
+ <?php endif ?>
+ </li>
+ <?php if ($project['is_public']): ?>
+ <li>
+ <?= Helper\a(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?>
+ </li>
+ <?php endif ?>
+ </ul>
+</div>
diff --git a/app/Template/task/duplicate.php b/app/Template/task/duplicate.php
new file mode 100644
index 00000000..3d1829ed
--- /dev/null
+++ b/app/Template/task/duplicate.php
@@ -0,0 +1,15 @@
+<div class="page-header">
+ <h2><?= t('Duplicate a task') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info">
+ <?= t('Do you really want to duplicate this task?') ?>
+ </p>
+
+ <div class="form-actions">
+ <?= Helper\a(t('Yes'), 'task', 'duplicate', array('task_id' => $task['id'], 'confirmation' => 'yes'), 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/task/duplicate_project.php b/app/Template/task/duplicate_project.php
new file mode 100644
index 00000000..45081842
--- /dev/null
+++ b/app/Template/task/duplicate_project.php
@@ -0,0 +1,24 @@
+<div class="page-header">
+ <h2><?= t('Duplicate the task to another project') ?></h2>
+</div>
+
+<?php if (empty($projects_list)): ?>
+ <p class="alert"><?= t('No project') ?></p>
+<?php else: ?>
+
+ <form method="post" action="<?= Helper\u('task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <?= Helper\form_hidden('id', $values) ?>
+ <?= Helper\form_label(t('Project'), 'project_id') ?>
+ <?= Helper\form_select('project_id', $projects_list, $values, $errors) ?><br/>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?>
+ <?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
+ </div>
+ </form>
+
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/edit.php b/app/Template/task/edit.php
new file mode 100644
index 00000000..6f136cb9
--- /dev/null
+++ b/app/Template/task/edit.php
@@ -0,0 +1,68 @@
+<div class="page-header">
+ <h2><?= t('Edit a task') ?></h2>
+</div>
+<section id="task-section">
+<form method="post" action="<?= Helper\u('task', 'update', array('task_id' => $task['id'], 'ajax' => $ajax)) ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <div class="form-column">
+
+ <?= Helper\form_label(t('Title'), 'title') ?>
+ <?= Helper\form_text('title', $values, $errors, array('required')) ?><br/>
+
+ <?= Helper\form_label(t('Description'), 'description') ?>
+
+ <div class="form-tabs">
+ <ul class="form-tabs-nav">
+ <li class="form-tab form-tab-selected">
+ <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a>
+ </li>
+ <li class="form-tab">
+ <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a>
+ </li>
+ </ul>
+ <div class="write-area">
+ <?= Helper\form_textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?>
+ </div>
+ <div class="preview-area">
+ <div class="markdown"></div>
+ </div>
+ </div>
+
+ <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+
+ </div>
+
+ <div class="form-column">
+ <?= Helper\form_hidden('id', $values) ?>
+ <?= Helper\form_hidden('project_id', $values) ?>
+
+ <?= Helper\form_label(t('Assignee'), 'owner_id') ?>
+ <?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Category'), 'category_id') ?>
+ <?= Helper\form_select('category_id', $categories_list, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Color'), 'color_id') ?>
+ <?= Helper\form_select('color_id', $colors_list, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Complexity'), 'score') ?>
+ <?= Helper\form_number('score', $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Due Date'), 'date_due') ?>
+ <?= Helper\form_text('date_due', $values, $errors, array('placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?><br/>
+ <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
+ </div>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?>
+ <?php if ($ajax): ?>
+ <?= Helper\a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ <?php else: ?>
+ <?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
+ <?php endif ?>
+ </div>
+</form>
+</section>
diff --git a/app/Template/task/edit_description.php b/app/Template/task/edit_description.php
new file mode 100644
index 00000000..9ec94d69
--- /dev/null
+++ b/app/Template/task/edit_description.php
@@ -0,0 +1,38 @@
+<div class="page-header">
+ <h2><?= t('Edit the description') ?></h2>
+</div>
+
+<form method="post" action="<?= Helper\u('task', 'description', array('task_id' => $task['id'], 'ajax' => $ajax)) ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+ <?= Helper\form_hidden('id', $values) ?>
+
+ <div class="form-tabs">
+ <ul class="form-tabs-nav">
+ <li class="form-tab form-tab-selected">
+ <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a>
+ </li>
+ <li class="form-tab">
+ <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a>
+ </li>
+ </ul>
+ <div class="write-area">
+ <?= Helper\form_textarea('description', $values, $errors, array('autofocus', 'placeholder="'.t('Leave a description').'"'), 'description-textarea') ?>
+ </div>
+ <div class="preview-area">
+ <div class="markdown"></div>
+ </div>
+ </div>
+
+ <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?>
+ <?php if ($ajax): ?>
+ <?= Helper\a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ <?php else: ?>
+ <?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
+ <?php endif ?>
+ </div>
+</form>
diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php
new file mode 100644
index 00000000..a73ce28f
--- /dev/null
+++ b/app/Template/task/layout.php
@@ -0,0 +1,15 @@
+<section id="main">
+ <div class="page-header">
+ <ul>
+ <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id'])) ?></li>
+ </ul>
+ </div>
+ <section class="sidebar-container" id="task-section">
+
+ <?= Helper\template('task/sidebar', array('task' => $task, 'hide_remove_menu' => isset($hide_remove_menu))) ?>
+
+ <div class="sidebar-content">
+ <?= $task_content_for_layout ?>
+ </div>
+ </section>
+</section> \ No newline at end of file
diff --git a/app/Template/task/move_project.php b/app/Template/task/move_project.php
new file mode 100644
index 00000000..1a355b02
--- /dev/null
+++ b/app/Template/task/move_project.php
@@ -0,0 +1,24 @@
+<div class="page-header">
+ <h2><?= t('Move the task to another project') ?></h2>
+</div>
+
+<?php if (empty($projects_list)): ?>
+ <p class="alert"><?= t('No project') ?></p>
+<?php else: ?>
+
+ <form method="post" action="<?= Helper\u('task', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <?= Helper\form_hidden('id', $values) ?>
+ <?= Helper\form_label(t('Project'), 'project_id') ?>
+ <?= Helper\form_select('project_id', $projects_list, $values, $errors) ?><br/>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?>
+ <?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
+ </div>
+ </form>
+
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/new.php b/app/Template/task/new.php
new file mode 100644
index 00000000..72e7d25b
--- /dev/null
+++ b/app/Template/task/new.php
@@ -0,0 +1,79 @@
+<?php if (! $ajax): ?>
+<div class="page-header">
+ <ul>
+ <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $values['project_id'])) ?></li>
+ </ul>
+</div>
+<?php else: ?>
+<div class="page-header">
+ <h2><?= t('New task') ?></h2>
+</div>
+<?php endif ?>
+
+<section id="task-section">
+<form method="post" action="<?= Helper\u('task', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <div class="form-column">
+ <?= Helper\form_label(t('Title'), 'title') ?>
+ <?= Helper\form_text('title', $values, $errors, array('autofocus', 'required'), 'form-input-large') ?><br/>
+
+ <?= Helper\form_label(t('Description'), 'description') ?>
+
+ <div class="form-tabs">
+ <ul class="form-tabs-nav">
+ <li class="form-tab form-tab-selected">
+ <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a>
+ </li>
+ <li class="form-tab">
+ <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a>
+ </li>
+ </ul>
+ <div class="write-area">
+ <?= Helper\form_textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?>
+ </div>
+ <div class="preview-area">
+ <div class="markdown"></div>
+ </div>
+ </div>
+
+ <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+
+ <?php if (! isset($duplicate)): ?>
+ <?= Helper\form_checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?>
+ <?php endif ?>
+ </div>
+
+ <div class="form-column">
+ <?= Helper\form_hidden('project_id', $values) ?>
+
+ <?= Helper\form_label(t('Assignee'), 'owner_id') ?>
+ <?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Category'), 'category_id') ?>
+ <?= Helper\form_select('category_id', $categories_list, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Column'), 'column_id') ?>
+ <?= Helper\form_select('column_id', $columns_list, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Color'), 'color_id') ?>
+ <?= Helper\form_select('color_id', $colors_list, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Complexity'), 'score') ?>
+ <?= Helper\form_number('score', $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Original estimate'), 'time_estimated') ?>
+ <?= Helper\form_numeric('time_estimated', $values, $errors) ?> <?= t('hours') ?><br/>
+
+ <?= Helper\form_label(t('Due Date'), 'date_due') ?>
+ <?= Helper\form_text('date_due', $values, $errors, array('placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?><br/>
+ <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
+ </div>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?> <?= Helper\a(t('cancel'), 'board', 'show', array('project_id' => $values['project_id'])) ?>
+ </div>
+</form>
+</section>
diff --git a/app/Template/task/open.php b/app/Template/task/open.php
new file mode 100644
index 00000000..5dec3b0e
--- /dev/null
+++ b/app/Template/task/open.php
@@ -0,0 +1,15 @@
+<div class="page-header">
+ <h2><?= t('Open a task') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info">
+ <?= t('Do you really want to open this task: "%s"?', Helper\escape($task['title'])) ?>
+ </p>
+
+ <div class="form-actions">
+ <?= Helper\a(t('Yes'), 'task', 'open', array('task_id' => $task['id'], 'confirmation' => 'yes'), 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/task/public.php b/app/Template/task/public.php
new file mode 100644
index 00000000..db8d26b0
--- /dev/null
+++ b/app/Template/task/public.php
@@ -0,0 +1,27 @@
+<section id="main" class="public-task">
+
+ <?= Helper\template('task_details', array('task' => $task, 'project' => $project)) ?>
+
+ <p class="pull-right"><?= Helper\a(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p>
+
+ <?= Helper\template('task/show_description', array(
+ 'task' => $task,
+ 'project' => $project,
+ 'is_public' => true
+ )) ?>
+
+ <?= Helper\template('subtask/show', array(
+ 'task' => $task,
+ 'subtasks' => $subtasks,
+ 'not_editable' => true
+ )) ?>
+
+ <?= Helper\template('task/comments', array(
+ 'task' => $task,
+ 'comments' => $comments,
+ 'project' => $project,
+ 'not_editable' => true,
+ 'is_public' => true,
+ )) ?>
+
+</section> \ No newline at end of file
diff --git a/app/Template/task/remove.php b/app/Template/task/remove.php
new file mode 100644
index 00000000..5d6095bc
--- /dev/null
+++ b/app/Template/task/remove.php
@@ -0,0 +1,15 @@
+<div class="page-header">
+ <h2><?= t('Remove a task') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info">
+ <?= t('Do you really want to remove this task: "%s"?', Helper\escape($task['title'])) ?>
+ </p>
+
+ <div class="form-actions">
+ <?= Helper\a(t('Yes'), 'task', 'remove', array('task_id' => $task['id'], 'confirmation' => 'yes'), 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/task/show.php b/app/Template/task/show.php
new file mode 100644
index 00000000..2652291a
--- /dev/null
+++ b/app/Template/task/show.php
@@ -0,0 +1,7 @@
+<?= Helper\template('task/details', array('task' => $task, 'project' => $project)) ?>
+<?= Helper\template('task/time', array('values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
+<?= 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('task/comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?> \ No newline at end of file
diff --git a/app/Template/task/show_description.php b/app/Template/task/show_description.php
new file mode 100644
index 00000000..25312149
--- /dev/null
+++ b/app/Template/task/show_description.php
@@ -0,0 +1,24 @@
+<?php if (! empty($task['description'])): ?>
+ <div id="description" class="task-show-section">
+ <div class="page-header">
+ <h2><?= t('Description') ?></h2>
+ </div>
+
+ <article class="markdown task-show-description">
+ <?php if (! isset($is_public)): ?>
+ <?= Helper\markdown($task['description']) ?>
+ <?php else: ?>
+ <?= Helper\markdown(
+ $task['description'],
+ array(
+ 'controller' => 'task',
+ 'action' => 'readonly',
+ 'params' => array(
+ 'token' => $project['token']
+ )
+ )
+ ) ?>
+ <?php endif ?>
+ </article>
+ </div>
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
new file mode 100644
index 00000000..25bddeab
--- /dev/null
+++ b/app/Template/task/sidebar.php
@@ -0,0 +1,44 @@
+<div class="sidebar">
+ <h2><?= t('Actions') ?></h2>
+ <ul>
+ <li>
+ <?= Helper\a(t('Summary'), 'task', 'show', array('task_id' => $task['id'])) ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Edit the task'), 'task', 'edit', array('task_id' => $task['id'])) ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Edit the description'), 'task', 'description', array('task_id' => $task['id'])) ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'])) ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'])) ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Attach a document'), 'file', 'create', array('task_id' => $task['id'])) ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Duplicate'), 'task', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Duplicate to another project'), 'task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Move to another project'), 'task', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?php if ($task['is_active'] == 1): ?>
+ <?= Helper\a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'])) ?>
+ <?php else: ?>
+ <?= Helper\a(t('Open this task'), 'task', 'open', array('task_id' => $task['id'])) ?>
+ <?php endif ?>
+ </li>
+ <?php if (! $hide_remove_menu): ?>
+ <li>
+ <?= Helper\a(t('Remove'), 'task', 'remove', array('task_id' => $task['id'])) ?>
+ </li>
+ <?php endif ?>
+ </ul>
+</div> \ No newline at end of file
diff --git a/app/Template/task/table.php b/app/Template/task/table.php
new file mode 100644
index 00000000..9f11ea85
--- /dev/null
+++ b/app/Template/task/table.php
@@ -0,0 +1,56 @@
+<table class="table-fixed table-small">
+ <tr>
+ <th class="column-8"><?= Helper\order(t('Id'), 'tasks.id', $pagination) ?></th>
+ <th class="column-8"><?= Helper\order(t('Column'), 'tasks.column_id', $pagination) ?></th>
+ <th class="column-8"><?= Helper\order(t('Category'), 'tasks.category_id', $pagination) ?></th>
+ <th><?= Helper\order(t('Title'), 'tasks.title', $pagination) ?></th>
+ <th class="column-10"><?= Helper\order(t('Assignee'), 'users.username', $pagination) ?></th>
+ <th class="column-10"><?= Helper\order(t('Due date'), 'tasks.date_due', $pagination) ?></th>
+ <th class="column-10"><?= Helper\order(t('Date created'), 'tasks.date_creation', $pagination) ?></th>
+ <th class="column-10"><?= Helper\order(t('Date completed'), 'tasks.date_completed', $pagination) ?></th>
+ <th class="column-5"><?= Helper\order(t('Status'), 'tasks.is_active', $pagination) ?></th>
+ </tr>
+ <?php foreach ($tasks as $task): ?>
+ <tr>
+ <td class="task-table task-<?= $task['color_id'] ?>">
+ <?= Helper\a('#'.Helper\escape($task['id']), 'task', 'show', array('task_id' => $task['id']), false, '', t('View this task')) ?>
+ </td>
+ <td>
+ <?= Helper\in_list($task['column_id'], $columns) ?>
+ </td>
+ <td>
+ <?= Helper\in_list($task['category_id'], $categories, '') ?>
+ </td>
+ <td>
+ <?= Helper\a(Helper\escape($task['title']), 'task', 'show', array('task_id' => $task['id']), false, '', t('View this task')) ?>
+ </td>
+ <td>
+ <?php if ($task['assignee_username']): ?>
+ <?= Helper\escape($task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?php else: ?>
+ <?= t('Unassigned') ?>
+ <?php endif ?>
+ </td>
+ <td>
+ <?= dt('%B %e, %Y', $task['date_due']) ?>
+ </td>
+ <td>
+ <?= dt('%B %e, %Y', $task['date_creation']) ?>
+ </td>
+ <td>
+ <?php if ($task['date_completed']): ?>
+ <?= dt('%B %e, %Y', $task['date_completed']) ?>
+ <?php endif ?>
+ </td>
+ <td>
+ <?php if ($task['is_active'] == \Model\Task::STATUS_OPEN): ?>
+ <?= t('Open') ?>
+ <?php else: ?>
+ <?= t('Closed') ?>
+ <?php endif ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<?= Helper\paginate($pagination) ?>
diff --git a/app/Template/task/time.php b/app/Template/task/time.php
new file mode 100644
index 00000000..11a76303
--- /dev/null
+++ b/app/Template/task/time.php
@@ -0,0 +1,15 @@
+<form method="post" action="<?= Helper\u('task', 'time', array('task_id' => $values['id'])) ?>" class="form-inline task-time-form" autocomplete="off">
+ <?= Helper\form_csrf() ?>
+ <?= Helper\form_hidden('id', $values) ?>
+
+ <?= Helper\form_label(t('Start date'), 'date_started') ?>
+ <?= Helper\form_text('date_started', $values, array(), array('placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?>
+
+ <?= Helper\form_label(t('Time estimated'), 'time_estimated') ?>
+ <?= Helper\form_numeric('time_estimated', $values, array(), array('placeholder="'.t('hours').'"')) ?>
+
+ <?= Helper\form_label(t('Time spent'), 'time_spent') ?>
+ <?= Helper\form_numeric('time_spent', $values, array(), array('placeholder="'.t('hours').'"')) ?>
+
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+</form> \ No newline at end of file
diff --git a/app/Template/task/timesheet.php b/app/Template/task/timesheet.php
new file mode 100644
index 00000000..cd093657
--- /dev/null
+++ b/app/Template/task/timesheet.php
@@ -0,0 +1,13 @@
+<?php if ($timesheet['time_estimated'] > 0 || $timesheet['time_spent'] > 0): ?>
+
+<div class="page-header">
+ <h2><?= t('Time tracking') ?></h2>
+</div>
+
+<ul class="listing">
+ <li><?= t('Estimate:') ?> <strong><?= Helper\escape($timesheet['time_estimated']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Spent:') ?> <strong><?= Helper\escape($timesheet['time_spent']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Remaining:') ?> <strong><?= Helper\escape($timesheet['time_remaining']) ?></strong> <?= t('hours') ?></li>
+</ul>
+
+<?php endif ?> \ No newline at end of file