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/analytics.php36
-rw-r--r--app/Template/task/close.php15
-rw-r--r--app/Template/task/description.php (renamed from app/Template/task/show_description.php)0
-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.php12
-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.php2
-rw-r--r--app/Template/task/show.php8
-rw-r--r--app/Template/task/sidebar.php25
-rw-r--r--app/Template/task/table.php56
-rw-r--r--app/Template/task/time.php15
-rw-r--r--app/Template/task/time_tracking_details.php (renamed from app/Template/task/time_tracking.php)2
-rw-r--r--app/Template/task/time_tracking_summary.php (renamed from app/Template/task/timesheet.php)0
-rw-r--r--app/Template/task/transitions.php2
21 files changed, 64 insertions, 434 deletions
diff --git a/app/Template/task/activity.php b/app/Template/task/activity.php
deleted file mode 100644
index cc4aad03..00000000
--- a/app/Template/task/activity.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<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/analytics.php b/app/Template/task/analytics.php
new file mode 100644
index 00000000..3b1d2855
--- /dev/null
+++ b/app/Template/task/analytics.php
@@ -0,0 +1,36 @@
+<div class="page-header">
+ <h2><?= t('Analytics') ?></h2>
+</div>
+
+<div class="listing">
+ <ul>
+ <li><?= t('Lead time: ').'<strong>'.$this->dt->duration($lead_time) ?></strong></li>
+ <li><?= t('Cycle time: ').'<strong>'.$this->dt->duration($cycle_time) ?></strong></li>
+ </ul>
+</div>
+
+<h3 id="analytic-task-time-column"><?= t('Time spent into each column') ?></h3>
+<div id="chart" data-metrics='<?= json_encode($time_spent_columns) ?>' data-label="<?= t('Time spent') ?>"></div>
+<table class="table-stripped">
+ <tr>
+ <th><?= t('Column') ?></th>
+ <th><?= t('Time spent') ?></th>
+ </tr>
+ <?php foreach ($time_spent_columns as $column): ?>
+ <tr>
+ <td><?= $this->e($column['title']) ?></td>
+ <td><?= $this->dt->duration($column['time_spent']) ?></td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<div class="alert alert-info">
+ <ul>
+ <li><?= t('The lead time is the duration between the task creation and the completion.') ?></li>
+ <li><?= t('The cycle time is the duration between the start date and the completion.') ?></li>
+ <li><?= t('If the task is not closed the current time is used instead of the completion date.') ?></li>
+ </ul>
+</div>
+
+<?= $this->asset->js('assets/js/vendor/d3.v3.min.js') ?>
+<?= $this->asset->js('assets/js/vendor/c3.min.js') ?> \ No newline at end of file
diff --git a/app/Template/task/close.php b/app/Template/task/close.php
deleted file mode 100644
index 160d5400..00000000
--- a/app/Template/task/close.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<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 the task "%s" as well as all subtasks?', $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/show_description.php b/app/Template/task/description.php
index f823e7d6..f823e7d6 100644
--- a/app/Template/task/show_description.php
+++ b/app/Template/task/description.php
diff --git a/app/Template/task/duplicate.php b/app/Template/task/duplicate.php
deleted file mode 100644
index e74d2906..00000000
--- a/app/Template/task/duplicate.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<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
deleted file mode 100644
index 9a8e3c4a..00000000
--- a/app/Template/task/duplicate_project.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<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
deleted file mode 100644
index 359df779..00000000
--- a/app/Template/task/edit.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<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('autofocus', 'required', 'maxlength="200"', 'tabindex="1"')) ?><br/>
-
- <?= $this->form->label(t('Description'), 'description') ?>
-
- <div class="form-tabs">
- <div class="write-area">
- <?= $this->form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"')) ?>
- </div>
- <div class="preview-area">
- <div class="markdown"></div>
- </div>
- <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>
-
- <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, array('tabindex="3"')) ?><br/>
-
- <?= $this->form->label(t('Category'), 'category_id') ?>
- <?= $this->form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?><br/>
-
- <?= $this->form->label(t('Color'), 'color_id') ?>
- <?= $this->form->select('color_id', $colors_list, $values, $errors, array('tabindex="5"')) ?><br/>
-
- <?= $this->form->label(t('Complexity'), 'score') ?>
- <?= $this->form->number('score', $values, $errors, array('tabindex="6"')) ?><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).'"', 'tabindex="7"'), '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" tabindex="10">
- <?= 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
deleted file mode 100644
index 84f0cebd..00000000
--- a/app/Template/task/edit_description.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<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
deleted file mode 100644
index c261e368..00000000
--- a/app/Template/task/edit_recurrence.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<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
index 5a14fb39..bbccf177 100644
--- a/app/Template/task/layout.php
+++ b/app/Template/task/layout.php
@@ -2,8 +2,12 @@
<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']) ?>
+ <i class="fa fa-th fa-fw"></i>
+ <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id']), false, '', '', false, $task['swimlane_id'] != 0 ? 'swimlane-'.$task['swimlane_id'] : '') ?>
+ </li>
+ <li>
+ <i class="fa fa-calendar fa-fw"></i>
+ <?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?>
</li>
<?php if ($this->user->isManager($task['project_id'])): ?>
<li>
@@ -11,10 +15,6 @@
<?= $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">
diff --git a/app/Template/task/move_project.php b/app/Template/task/move_project.php
deleted file mode 100644
index b0b33f81..00000000
--- a/app/Template/task/move_project.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<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
deleted file mode 100644
index 181b82bf..00000000
--- a/app/Template/task/new.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?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"', 'tabindex="1"'), 'form-input-large') ?><br/>
-
- <?= $this->form->label(t('Description'), 'description') ?>
-
- <div class="form-tabs">
- <div class="write-area">
- <?= $this->form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"')) ?>
- </div>
- <div class="preview-area">
- <div class="markdown"></div>
- </div>
- <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>
-
- <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, array('tabindex="3"')) ?><br/>
-
- <?= $this->form->label(t('Category'), 'category_id') ?>
- <?= $this->form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?><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, array('tabindex="5"')) ?><br/>
- <?php endif ?>
-
- <?= $this->form->label(t('Column'), 'column_id') ?>
- <?= $this->form->select('column_id', $columns_list, $values, $errors, array('tabindex="6"')) ?><br/>
-
- <?= $this->form->label(t('Color'), 'color_id') ?>
- <?= $this->form->select('color_id', $colors_list, $values, $errors, array('tabindex="7"')) ?><br/>
-
- <?= $this->form->label(t('Complexity'), 'score') ?>
- <?= $this->form->number('score', $values, $errors, array('tabindex="8"')) ?><br/>
-
- <?= $this->form->label(t('Original estimate'), 'time_estimated') ?>
- <?= $this->form->numeric('time_estimated', $values, $errors, array('tabindex="9"')) ?> <?= 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).'"', 'tabindex="10"'), '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" tabindex="11"/>
- <?= 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
deleted file mode 100644
index fbcc1111..00000000
--- a/app/Template/task/open.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<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
index 73116de9..e3105488 100644
--- a/app/Template/task/public.php
+++ b/app/Template/task/public.php
@@ -4,7 +4,7 @@
<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(
+ <?= $this->render('task/description', array(
'task' => $task,
'project' => $project,
'is_public' => true
diff --git a/app/Template/task/show.php b/app/Template/task/show.php
index 54c124f6..68d63c58 100644
--- a/app/Template/task/show.php
+++ b/app/Template/task/show.php
@@ -6,10 +6,10 @@
'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('task_modification/edit_time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
+<?= $this->render('task/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('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project, 'users_list' => isset($users_list) ? $users_list : array())) ?>
+<?= $this->render('task/time_tracking_summary', 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/sidebar.php b/app/Template/task/sidebar.php
index bb137ac9..1116040a 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -5,27 +5,30 @@
<?= $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'])) ?>
+ <?= $this->url->link(t('Activity stream'), 'activity', 'task', 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>
+ <li>
+ <?= $this->url->link(t('Analytics'), 'task', 'analytics', 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'])) ?>
+ <?= $this->url->link(t('Time tracking'), 'task', 'timetracking', 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'])) ?>
+ <?= $this->url->link(t('Edit the task'), 'taskmodification', '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'])) ?>
+ <?= $this->url->link(t('Edit the description'), 'taskmodification', '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'])) ?>
+ <?= $this->url->link(t('Edit recurrence'), 'taskmodification', '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'])) ?>
@@ -43,19 +46,19 @@
<?= $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'])) ?>
+ <?= $this->url->link(t('Duplicate'), 'taskduplication', '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'])) ?>
+ <?= $this->url->link(t('Duplicate to another project'), 'taskduplication', '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'])) ?>
+ <?= $this->url->link(t('Move to another project'), 'taskduplication', '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'])) ?>
+ <?= $this->url->link(t('Close this task'), 'taskstatus', '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'])) ?>
+ <?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
<?php endif ?>
</li>
<?php if ($this->task->canRemove($task)): ?>
@@ -64,4 +67,6 @@
</li>
<?php endif ?>
</ul>
+ <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div>
+ <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div>
</div>
diff --git a/app/Template/task/table.php b/app/Template/task/table.php
deleted file mode 100644
index d06bc7b7..00000000
--- a/app/Template/task/table.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<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
deleted file mode 100644
index 6682a08d..00000000
--- a/app/Template/task/time.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<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_details.php
index 441cb585..faa07cb8 100644
--- a/app/Template/task/time_tracking.php
+++ b/app/Template/task/time_tracking_details.php
@@ -1,4 +1,4 @@
-<?= $this->render('task/timesheet', array('task' => $task)) ?>
+<?= $this->render('task/time_tracking_summary', array('task' => $task)) ?>
<h3><?= t('Subtask timesheet') ?></h3>
<?php if ($subtask_paginator->isEmpty()): ?>
diff --git a/app/Template/task/timesheet.php b/app/Template/task/time_tracking_summary.php
index 0210be7e..0210be7e 100644
--- a/app/Template/task/timesheet.php
+++ b/app/Template/task/time_tracking_summary.php
diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php
index 6455fd66..2ca2387f 100644
--- a/app/Template/task/transitions.php
+++ b/app/Template/task/transitions.php
@@ -19,7 +19,7 @@
<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>
+ <td><?= $this->dt->duration($transition['time_spent']) ?></td>
</tr>
<?php endforeach ?>
</table>