summaryrefslogtreecommitdiff
path: root/app/Template/task
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/task')
-rw-r--r--app/Template/task/activity.php5
-rw-r--r--app/Template/task/close.php15
-rw-r--r--app/Template/task/comments.php29
-rw-r--r--app/Template/task/details.php96
-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/edit_recurrence.php52
-rw-r--r--app/Template/task/layout.php28
-rw-r--r--app/Template/task/move_project.php24
-rw-r--r--app/Template/task/new.php84
-rw-r--r--app/Template/task/open.php15
-rw-r--r--app/Template/task/public.php34
-rw-r--r--app/Template/task/recurring_info.php37
-rw-r--r--app/Template/task/remove.php15
-rw-r--r--app/Template/task/show.php15
-rw-r--r--app/Template/task/show_description.php33
-rw-r--r--app/Template/task/sidebar.php67
-rw-r--r--app/Template/task/table.php56
-rw-r--r--app/Template/task/time.php15
-rw-r--r--app/Template/task/time_tracking.php27
-rw-r--r--app/Template/task/timesheet.php13
-rw-r--r--app/Template/task/transitions.php26
24 files changed, 831 insertions, 0 deletions
diff --git a/app/Template/task/activity.php b/app/Template/task/activity.php
new file mode 100644
index 00000000..cc4aad03
--- /dev/null
+++ b/app/Template/task/activity.php
@@ -0,0 +1,5 @@
+<div class="page-header">
+ <h2><?= t('Activity stream') ?></h2>
+</div>
+
+<?= $this->render('event/events', array('events' => $events)) ?> \ No newline at end of file
diff --git a/app/Template/task/close.php b/app/Template/task/close.php
new file mode 100644
index 00000000..79150333
--- /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"?', $this->e($task['title'])) ?>
+ </p>
+
+ <div class="form-actions">
+ <?= $this->url->link(t('Yes'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), 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/task/comments.php b/app/Template/task/comments.php
new file mode 100644
index 00000000..a09862f9
--- /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): ?>
+ <?= $this->render('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)): ?>
+ <?= $this->render('comment/create', array(
+ 'skip_cancel' => true,
+ 'values' => array(
+ 'user_id' => $this->user->getId(),
+ '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..f688585a
--- /dev/null
+++ b/app/Template/task/details.php
@@ -0,0 +1,96 @@
+<div class="color-<?= $task['color_id'] ?> task-show-details">
+ <h2><?= $this->e('#'.$task['id'].' '.$task['title']) ?></h2>
+ <?php if ($task['score']): ?>
+ <span class="task-score"><?= $this->e($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><?= $this->e($task['column_title']) ?></strong>
+ (<?= $this->e($task['project_name']) ?>)
+ <?= dt('since %B %e, %Y at %k:%M %p', $task['date_moved']) ?>
+ </li>
+ <li><?= t('Task position:').' '.$this->e($task['position']) ?></li>
+ <?php if ($task['category_name']): ?>
+ <li>
+ <?= t('Category:') ?> <strong><?= $this->e($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>
+ <?= $this->url->link(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?>
+ </li>
+ <?php endif ?>
+
+ <?php if (! isset($not_editable) && $task['recurrence_status'] != \Model\Task::RECURRING_STATUS_NONE): ?>
+ <li>
+ <strong><?= t('Recurring information') ?></strong>
+ <?= $this->render('task/recurring_info', array(
+ 'task' => $task,
+ 'recurrence_trigger_list' => $recurrence_trigger_list,
+ 'recurrence_timeframe_list' => $recurrence_timeframe_list,
+ 'recurrence_basedate_list' => $recurrence_basedate_list,
+ )) ?>
+ </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..e74d2906
--- /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">
+ <?= $this->url->link(t('Yes'), 'task', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_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..9a8e3c4a
--- /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="<?= $this->url->href('task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
+
+ <?= $this->form->csrf() ?>
+
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->label(t('Project'), 'project_id') ?>
+ <?= $this->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') ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_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..2900b739
--- /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="<?= $this->url->href('task', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off">
+
+ <?= $this->form->csrf() ?>
+
+ <div class="form-column">
+
+ <?= $this->form->label(t('Title'), 'title') ?>
+ <?= $this->form->text('title', $values, $errors, array('required', 'maxlength="200"')) ?><br/>
+
+ <?= $this->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">
+ <?= $this->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">
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
+
+ <?= $this->form->label(t('Assignee'), 'owner_id') ?>
+ <?= $this->form->select('owner_id', $users_list, $values, $errors) ?><br/>
+
+ <?= $this->form->label(t('Category'), 'category_id') ?>
+ <?= $this->form->select('category_id', $categories_list, $values, $errors) ?><br/>
+
+ <?= $this->form->label(t('Color'), 'color_id') ?>
+ <?= $this->form->select('color_id', $colors_list, $values, $errors) ?><br/>
+
+ <?= $this->form->label(t('Complexity'), 'score') ?>
+ <?= $this->form->number('score', $values, $errors) ?><br/>
+
+ <?= $this->form->label(t('Due Date'), 'date_due') ?>
+ <?= $this->form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($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): ?>
+ <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?>
+ <?php else: ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_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..84f0cebd
--- /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="<?= $this->url->href('task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off">
+
+ <?= $this->form->csrf() ?>
+ <?= $this->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">
+ <?= $this->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): ?>
+ <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ <?php else: ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?php endif ?>
+ </div>
+</form>
diff --git a/app/Template/task/edit_recurrence.php b/app/Template/task/edit_recurrence.php
new file mode 100644
index 00000000..c261e368
--- /dev/null
+++ b/app/Template/task/edit_recurrence.php
@@ -0,0 +1,52 @@
+<div class="page-header">
+ <h2><?= t('Edit recurrence') ?></h2>
+</div>
+
+<?php if ($task['recurrence_status'] != \Model\Task::RECURRING_STATUS_NONE): ?>
+<div class="listing">
+ <?= $this->render('task/recurring_info', array(
+ 'task' => $task,
+ 'recurrence_trigger_list' => $recurrence_trigger_list,
+ 'recurrence_timeframe_list' => $recurrence_timeframe_list,
+ 'recurrence_basedate_list' => $recurrence_basedate_list,
+ )) ?>
+</div>
+<?php endif ?>
+
+<?php if ($task['recurrence_status'] != \Model\Task::RECURRING_STATUS_PROCESSED): ?>
+
+ <form method="post" action="<?= $this->url->href('task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off">
+
+ <?= $this->form->csrf() ?>
+
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
+
+ <?= $this->form->label(t('Generate recurrent task'), 'recurrence_status') ?>
+ <?= $this->form->select('recurrence_status', $recurrence_status_list, $values, $errors) ?>
+
+ <?= $this->form->label(t('Trigger to generate recurrent task'), 'recurrence_trigger') ?>
+ <?= $this->form->select('recurrence_trigger', $recurrence_trigger_list, $values, $errors) ?>
+
+ <?= $this->form->label(t('Factor to calculate new due date'), 'recurrence_factor') ?>
+ <?= $this->form->number('recurrence_factor', $values, $errors) ?>
+
+ <?= $this->form->label(t('Timeframe to calculate new due date'), 'recurrence_timeframe') ?>
+ <?= $this->form->select('recurrence_timeframe', $recurrence_timeframe_list, $values, $errors) ?>
+
+ <?= $this->form->label(t('Base date to calculate new due date'), 'recurrence_basedate') ?>
+ <?= $this->form->select('recurrence_basedate', $recurrence_basedate_list, $values, $errors) ?>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?>
+
+ <?php if ($ajax): ?>
+ <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ <?php else: ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?php endif ?>
+ </div>
+ </form>
+
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php
new file mode 100644
index 00000000..5a14fb39
--- /dev/null
+++ b/app/Template/task/layout.php
@@ -0,0 +1,28 @@
+<section id="main">
+ <div class="page-header">
+ <ul>
+ <li>
+ <i class="fa fa-table fa-fw"></i>
+ <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id']), false, '', '', false, 'swimlane-'.$task['swimlane_id']) ?>
+ </li>
+ <?php if ($this->user->isManager($task['project_id'])): ?>
+ <li>
+ <i class="fa fa-cog fa-fw"></i>
+ <?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ <li>
+ <i class="fa fa-calendar fa-fw"></i>
+ <?= $this->url->link(t('Project calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?>
+ </li>
+ </ul>
+ </div>
+ <section class="sidebar-container" id="task-section">
+
+ <?= $this->render('task/sidebar', array('task' => $task)) ?>
+
+ <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..b0b33f81
--- /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="<?= $this->url->href('task', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
+
+ <?= $this->form->csrf() ?>
+
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->label(t('Project'), 'project_id') ?>
+ <?= $this->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') ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_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..bd00d347
--- /dev/null
+++ b/app/Template/task/new.php
@@ -0,0 +1,84 @@
+<?php if (! $ajax): ?>
+<div class="page-header">
+ <ul>
+ <li><i class="fa fa-table fa-fw"></i><?= $this->url->link(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="<?= $this->url->href('task', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off">
+
+ <?= $this->form->csrf() ?>
+
+ <div class="form-column">
+ <?= $this->form->label(t('Title'), 'title') ?>
+ <?= $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"'), 'form-input-large') ?><br/>
+
+ <?= $this->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">
+ <?= $this->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)): ?>
+ <?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?>
+ <?php endif ?>
+ </div>
+
+ <div class="form-column">
+ <?= $this->form->hidden('project_id', $values) ?>
+
+ <?= $this->form->label(t('Assignee'), 'owner_id') ?>
+ <?= $this->form->select('owner_id', $users_list, $values, $errors) ?><br/>
+
+ <?= $this->form->label(t('Category'), 'category_id') ?>
+ <?= $this->form->select('category_id', $categories_list, $values, $errors) ?><br/>
+
+ <?php if (! (count($swimlanes_list) === 1 && key($swimlanes_list) === 0)): ?>
+ <?= $this->form->label(t('Swimlane'), 'swimlane_id') ?>
+ <?= $this->form->select('swimlane_id', $swimlanes_list, $values, $errors) ?><br/>
+ <?php endif ?>
+
+ <?= $this->form->label(t('Column'), 'column_id') ?>
+ <?= $this->form->select('column_id', $columns_list, $values, $errors) ?><br/>
+
+ <?= $this->form->label(t('Color'), 'color_id') ?>
+ <?= $this->form->select('color_id', $colors_list, $values, $errors) ?><br/>
+
+ <?= $this->form->label(t('Complexity'), 'score') ?>
+ <?= $this->form->number('score', $values, $errors) ?><br/>
+
+ <?= $this->form->label(t('Original estimate'), 'time_estimated') ?>
+ <?= $this->form->numeric('time_estimated', $values, $errors) ?> <?= t('hours') ?><br/>
+
+ <?= $this->form->label(t('Due Date'), 'date_due') ?>
+ <?= $this->form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($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') ?> <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?>
+ </div>
+</form>
+</section>
diff --git a/app/Template/task/open.php b/app/Template/task/open.php
new file mode 100644
index 00000000..fbcc1111
--- /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"?', $this->e($task['title'])) ?>
+ </p>
+
+ <div class="form-actions">
+ <?= $this->url->link(t('Yes'), 'task', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_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..73116de9
--- /dev/null
+++ b/app/Template/task/public.php
@@ -0,0 +1,34 @@
+<section id="main" class="public-task">
+
+ <?= $this->render('task/details', array('task' => $task, 'project' => $project, 'not_editable' => true)) ?>
+
+ <p class="pull-right"><?= $this->url->link(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p>
+
+ <?= $this->render('task/show_description', array(
+ 'task' => $task,
+ 'project' => $project,
+ 'is_public' => true
+ )) ?>
+
+ <?= $this->render('tasklink/show', array(
+ 'task' => $task,
+ 'links' => $links,
+ 'project' => $project,
+ 'not_editable' => true
+ )) ?>
+
+ <?= $this->render('subtask/show', array(
+ 'task' => $task,
+ 'subtasks' => $subtasks,
+ 'not_editable' => true
+ )) ?>
+
+ <?= $this->render('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/recurring_info.php b/app/Template/task/recurring_info.php
new file mode 100644
index 00000000..ad64ae19
--- /dev/null
+++ b/app/Template/task/recurring_info.php
@@ -0,0 +1,37 @@
+<ul>
+ <?php if ($task['recurrence_status'] == \Model\Task::RECURRING_STATUS_PENDING): ?>
+ <li><?= t('Recurrent task is scheduled to be generated') ?></li>
+ <?php elseif ($task['recurrence_status'] == \Model\Task::RECURRING_STATUS_PROCESSED): ?>
+ <li><?= t('Recurrent task has been generated:') ?>
+ <ul>
+ <li>
+ <?= t('Trigger to generate recurrent task: ') ?><strong><?= $this->e($recurrence_trigger_list[$task['recurrence_trigger']]) ?></strong>
+ </li>
+ <li>
+ <?= t('Factor to calculate new due date: ') ?><strong><?= $this->e($task['recurrence_factor']) ?></strong>
+ </li>
+ <li>
+ <?= t('Timeframe to calculate new due date: ') ?><strong><?= $this->e($recurrence_timeframe_list[$task['recurrence_timeframe']]) ?></strong>
+ </li>
+ <li>
+ <?= t('Base date to calculate new due date: ') ?><strong><?= $this->e($recurrence_basedate_list[$task['recurrence_basedate']]) ?></strong>
+ </li>
+ </ul>
+ </li>
+ <?php endif ?>
+
+ <?php if ($task['recurrence_parent'] || $task['recurrence_child']): ?>
+ <?php if ($task['recurrence_parent']): ?>
+ <li>
+ <?= t('This task has been created by: ') ?>
+ <?= $this->url->link('#'.$task['recurrence_parent'], 'task', 'show', array('task_id' => $task['recurrence_parent'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($task['recurrence_child']): ?>
+ <li>
+ <?= t('This task has created this child task: ') ?>
+ <?= $this->url->link('#'.$task['recurrence_child'], 'task', 'show', array('task_id' => $task['recurrence_child'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ <?php endif ?>
+</ul> \ 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..2f6edc22
--- /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"?', $this->e($task['title'])) ?>
+ </p>
+
+ <div class="form-actions">
+ <?= $this->url->link(t('Yes'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_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..54c124f6
--- /dev/null
+++ b/app/Template/task/show.php
@@ -0,0 +1,15 @@
+<?= $this->render('task/details', array(
+ 'task' => $task,
+ 'project' => $project,
+ 'recurrence_trigger_list' => $this->task->recurrenceTriggers(),
+ 'recurrence_timeframe_list' => $this->task->recurrenceTimeframes(),
+ 'recurrence_basedate_list' => $this->task->recurrenceBasedates(),
+)) ?>
+
+<?= $this->render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
+<?= $this->render('task/show_description', array('task' => $task)) ?>
+<?= $this->render('tasklink/show', array('task' => $task, 'links' => $links, 'link_label_list' => $link_label_list)) ?>
+<?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project)) ?>
+<?= $this->render('task/timesheet', array('task' => $task)) ?>
+<?= $this->render('file/show', array('task' => $task, 'files' => $files, 'images' => $images)) ?>
+<?= $this->render('task/comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?>
diff --git a/app/Template/task/show_description.php b/app/Template/task/show_description.php
new file mode 100644
index 00000000..f823e7d6
--- /dev/null
+++ b/app/Template/task/show_description.php
@@ -0,0 +1,33 @@
+<?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)): ?>
+ <?= $this->text->markdown(
+ $task['description'],
+ array(
+ 'controller' => 'task',
+ 'action' => 'show',
+ 'params' => array(
+ 'project_id' => $task['project_id']
+ )
+ )
+ ) ?>
+ <?php else: ?>
+ <?= $this->text->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..bb137ac9
--- /dev/null
+++ b/app/Template/task/sidebar.php
@@ -0,0 +1,67 @@
+<div class="sidebar">
+ <h2><?= t('Information') ?></h2>
+ <ul>
+ <li>
+ <?= $this->url->link(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Activity stream'), 'task', 'activites', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Transitions'), 'task', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?>
+ <li>
+ <?= $this->url->link(t('Time tracking'), 'task', 'timesheet', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ </ul>
+ <h2><?= t('Actions') ?></h2>
+ <ul>
+ <li>
+ <?= $this->url->link(t('Edit the task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Edit the description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Attach a document'), 'file', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Add a screenshot'), 'file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Duplicate'), 'task', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Duplicate to another project'), 'task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(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): ?>
+ <?= $this->url->link(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?php else: ?>
+ <?= $this->url->link(t('Open this task'), 'task', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?php endif ?>
+ </li>
+ <?php if ($this->task->canRemove($task)): ?>
+ <li>
+ <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ </ul>
+</div>
diff --git a/app/Template/task/table.php b/app/Template/task/table.php
new file mode 100644
index 00000000..d06bc7b7
--- /dev/null
+++ b/app/Template/task/table.php
@@ -0,0 +1,56 @@
+<table class="table-fixed table-small">
+ <tr>
+ <th class="column-8"><?= $paginator->order(t('Id'), 'tasks.id') ?></th>
+ <th class="column-8"><?= $paginator->order(t('Column'), 'tasks.column_id') ?></th>
+ <th class="column-8"><?= $paginator->order(t('Category'), 'tasks.category_id') ?></th>
+ <th><?= $paginator->order(t('Title'), 'tasks.title') ?></th>
+ <th class="column-10"><?= $paginator->order(t('Assignee'), 'users.username') ?></th>
+ <th class="column-10"><?= $paginator->order(t('Due date'), 'tasks.date_due') ?></th>
+ <th class="column-10"><?= $paginator->order(t('Date created'), 'tasks.date_creation') ?></th>
+ <th class="column-10"><?= $paginator->order(t('Date completed'), 'tasks.date_completed') ?></th>
+ <th class="column-5"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th>
+ </tr>
+ <?php foreach ($paginator->getCollection() as $task): ?>
+ <tr>
+ <td class="task-table color-<?= $task['color_id'] ?>">
+ <?= $this->url->link('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ </td>
+ <td>
+ <?= $this->text->in($task['column_id'], $columns) ?>
+ </td>
+ <td>
+ <?= $this->text->in($task['category_id'], $categories, '') ?>
+ </td>
+ <td>
+ <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ </td>
+ <td>
+ <?php if ($task['assignee_username']): ?>
+ <?= $this->e($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>
+
+<?= $paginator ?>
diff --git a/app/Template/task/time.php b/app/Template/task/time.php
new file mode 100644
index 00000000..6682a08d
--- /dev/null
+++ b/app/Template/task/time.php
@@ -0,0 +1,15 @@
+<form method="post" action="<?= $this->url->href('task', 'time', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" class="form-inline task-time-form" autocomplete="off">
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('id', $values) ?>
+
+ <?= $this->form->label(t('Start date'), 'date_started') ?>
+ <?= $this->form->text('date_started', $values, array(), array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+
+ <?= $this->form->label(t('Time estimated'), 'time_estimated') ?>
+ <?= $this->form->numeric('time_estimated', $values, array(), array('placeholder="'.t('hours').'"')) ?>
+
+ <?= $this->form->label(t('Time spent'), 'time_spent') ?>
+ <?= $this->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/time_tracking.php b/app/Template/task/time_tracking.php
new file mode 100644
index 00000000..441cb585
--- /dev/null
+++ b/app/Template/task/time_tracking.php
@@ -0,0 +1,27 @@
+<?= $this->render('task/timesheet', array('task' => $task)) ?>
+
+<h3><?= t('Subtask timesheet') ?></h3>
+<?php if ($subtask_paginator->isEmpty()): ?>
+ <p class="alert"><?= t('There is nothing to show.') ?></p>
+<?php else: ?>
+ <table class="table-fixed">
+ <tr>
+ <th class="column-15"><?= $subtask_paginator->order(t('User'), 'username') ?></th>
+ <th><?= $subtask_paginator->order(t('Subtask'), 'subtask_title') ?></th>
+ <th class="column-20"><?= $subtask_paginator->order(t('Start'), 'start') ?></th>
+ <th class="column-20"><?= $subtask_paginator->order(t('End'), 'end') ?></th>
+ <th class="column-10"><?= $subtask_paginator->order(t('Time spent'), 'time_spent') ?></th>
+ </tr>
+ <?php foreach ($subtask_paginator->getCollection() as $record): ?>
+ <tr>
+ <td><?= $this->url->link($this->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
+ <td><?= t($record['subtask_title']) ?></td>
+ <td><?= dt('%B %e, %Y at %k:%M %p', $record['start']) ?></td>
+ <td><?= dt('%B %e, %Y at %k:%M %p', $record['end']) ?></td>
+ <td><?= n($record['time_spent']).' '.t('hours') ?></td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+
+ <?= $subtask_paginator ?>
+<?php endif ?> \ 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..0210be7e
--- /dev/null
+++ b/app/Template/task/timesheet.php
@@ -0,0 +1,13 @@
+<?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?>
+
+<div class="page-header">
+ <h2><?= t('Time tracking') ?></h2>
+</div>
+
+<ul class="listing">
+ <li><?= t('Estimate:') ?> <strong><?= $this->e($task['time_estimated']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Spent:') ?> <strong><?= $this->e($task['time_spent']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Remaining:') ?> <strong><?= $this->e($task['time_estimated'] - $task['time_spent']) ?></strong> <?= t('hours') ?></li>
+</ul>
+
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php
new file mode 100644
index 00000000..6455fd66
--- /dev/null
+++ b/app/Template/task/transitions.php
@@ -0,0 +1,26 @@
+<div class="page-header">
+ <h2><?= t('Transitions') ?></h2>
+</div>
+
+<?php if (empty($transitions)): ?>
+ <p class="alert"><?= t('There is nothing to show.') ?></p>
+<?php else: ?>
+ <table class="table-stripped">
+ <tr>
+ <th><?= t('Date') ?></th>
+ <th><?= t('Source column') ?></th>
+ <th><?= t('Destination column') ?></th>
+ <th><?= t('Executer') ?></th>
+ <th><?= t('Time spent in the column') ?></th>
+ </tr>
+ <?php foreach ($transitions as $transition): ?>
+ <tr>
+ <td><?= dt('%B %e, %Y at %k:%M %p', $transition['date']) ?></td>
+ <td><?= $this->e($transition['src_column']) ?></td>
+ <td><?= $this->e($transition['dst_column']) ?></td>
+ <td><?= $this->url->link($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
+ <td><?= n(round($transition['time_spent'] / 3600, 2)).' '.t('hours') ?></td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+<?php endif ?> \ No newline at end of file