From daa076eea7185a3b67dbfed7b34e42f3049026df Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 3 Sep 2016 21:20:54 -0400 Subject: Convert time comparison chart to Vue.js component --- app/Template/analytic/compare_hours.php | 62 ------------------------------- app/Template/analytic/sidebar.php | 4 +- app/Template/analytic/time_comparison.php | 61 ++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 64 deletions(-) delete mode 100644 app/Template/analytic/compare_hours.php create mode 100644 app/Template/analytic/time_comparison.php (limited to 'app/Template/analytic') diff --git a/app/Template/analytic/compare_hours.php b/app/Template/analytic/compare_hours.php deleted file mode 100644 index c0b9cfc3..00000000 --- a/app/Template/analytic/compare_hours.php +++ /dev/null @@ -1,62 +0,0 @@ - - -
- -
- - -

- -
-
- - isEmpty()): ?> -

- isEmpty()): ?> - - - - - - - - - getCollection() as $task): ?> - - - - - - - - -
order(t('Id'), 'tasks.id') ?>order(t('Title'), 'tasks.title') ?>order(t('Status'), 'tasks.is_active') ?>order(t('Estimated Time'), 'tasks.time_estimated') ?>order(t('Actual Time'), 'tasks.time_spent') ?>
- url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> - - url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> - - - - - - - - text->e($task['time_estimated']) ?> - - text->e($task['time_spent']) ?> -
- - - -
- diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php index ceb57fac..f768a11d 100644 --- a/app/Template/analytic/sidebar.php +++ b/app/Template/analytic/sidebar.php @@ -18,8 +18,8 @@
  • app->checkMenuSelection('AnalyticController', 'leadAndCycleTime') ?>> url->link(t('Lead and cycle time'), 'AnalyticController', 'leadAndCycleTime', array('project_id' => $project['id'])) ?>
  • -
  • app->checkMenuSelection('AnalyticController', 'compareHours') ?>> - url->link(t('Estimated vs actual time'), 'AnalyticController', 'compareHours', array('project_id' => $project['id'])) ?> +
  • app->checkMenuSelection('AnalyticController', 'timeComparison') ?>> + url->link(t('Estimated vs actual time'), 'AnalyticController', 'timeComparison', array('project_id' => $project['id'])) ?>
  • hook->render('template:analytic:sidebar', array('project' => $project)) ?> diff --git a/app/Template/analytic/time_comparison.php b/app/Template/analytic/time_comparison.php new file mode 100644 index 00000000..ee0ee4b6 --- /dev/null +++ b/app/Template/analytic/time_comparison.php @@ -0,0 +1,61 @@ + + +
    + +
    + + +

    + + isEmpty()): ?> +

    + isEmpty()): ?> + + + + + + + + + + + + getCollection() as $task): ?> + + + + + + + + +
    order(t('Id'), 'tasks.id') ?>order(t('Title'), 'tasks.title') ?>order(t('Status'), 'tasks.is_active') ?>order(t('Estimated Time'), 'tasks.time_estimated') ?>order(t('Actual Time'), 'tasks.time_spent') ?>
    + url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + + url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + + + + + + + + text->e($task['time_estimated']) ?> + + text->e($task['time_spent']) ?> +
    + + + + -- cgit v1.2.3