diff options
author | Lesstat <florianbarth@gmx.de> | 2015-07-11 11:44:26 +0200 |
---|---|---|
committer | Lesstat <florianbarth@gmx.de> | 2015-07-11 11:44:26 +0200 |
commit | a85a1c613239c20fe72eb96c2921f4c220ec156b (patch) | |
tree | d032b4591e518cbbbfaa8886f8f5d98a6ea2efb7 /app/Template/task | |
parent | 5101eaa8060ce3c75a81a26f6e47aae40e3d4ac3 (diff) | |
parent | 7e94d0ca233d15d6124c0adf3f956a119c82ccae (diff) |
Merged branch 'master' of https://github.com/fguillot/kanboard
only imports conflicted
Diffstat (limited to 'app/Template/task')
-rw-r--r-- | app/Template/task/activity.php | 5 | ||||
-rw-r--r-- | app/Template/task/analytics.php | 36 | ||||
-rw-r--r-- | app/Template/task/layout.php | 2 | ||||
-rw-r--r-- | app/Template/task/sidebar.php | 5 | ||||
-rw-r--r-- | app/Template/task/time.php | 7 | ||||
-rw-r--r-- | app/Template/task/transitions.php | 2 |
6 files changed, 48 insertions, 9 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/layout.php b/app/Template/task/layout.php index ddce4bce..bbccf177 100644 --- a/app/Template/task/layout.php +++ b/app/Template/task/layout.php @@ -3,7 +3,7 @@ <ul> <li> <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, 'swimlane-'.$task['swimlane_id']) ?> + <?= $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> diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index bb137ac9..8b0f3c6e 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -5,11 +5,14 @@ <?= $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'])) ?> diff --git a/app/Template/task/time.php b/app/Template/task/time.php index 6682a08d..90407d7a 100644 --- a/app/Template/task/time.php +++ b/app/Template/task/time.php @@ -1,9 +1,14 @@ <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"> + + <?php if (empty($values['date_started'])): ?> + <?= $this->url->link('<i class="fa fa-play"></i>', 'task', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-show-start-link', t('Set automatically the start date')) ?> + <?php endif ?> + <?= $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->text('date_started', $values, array(), array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-datetime') ?> <?= $this->form->label(t('Time estimated'), 'time_estimated') ?> <?= $this->form->numeric('time_estimated', $values, array(), array('placeholder="'.t('hours').'"')) ?> 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> |