diff options
Diffstat (limited to 'app/Template/analytic')
-rw-r--r-- | app/Template/analytic/avg_time_columns.php | 28 | ||||
-rw-r--r-- | app/Template/analytic/burndown.php | 24 | ||||
-rw-r--r-- | app/Template/analytic/cfd.php | 24 | ||||
-rw-r--r-- | app/Template/analytic/layout.php | 18 | ||||
-rw-r--r-- | app/Template/analytic/lead_cycle_time.php | 24 | ||||
-rw-r--r-- | app/Template/analytic/sidebar.php | 15 | ||||
-rw-r--r-- | app/Template/analytic/task_distribution.php | 8 | ||||
-rw-r--r-- | app/Template/analytic/time_comparison.php | 14 | ||||
-rw-r--r-- | app/Template/analytic/user_distribution.php | 8 |
9 files changed, 75 insertions, 88 deletions
diff --git a/app/Template/analytic/avg_time_columns.php b/app/Template/analytic/avg_time_columns.php index 929331a9..1af69c8b 100644 --- a/app/Template/analytic/avg_time_columns.php +++ b/app/Template/analytic/avg_time_columns.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Average time spent into each column') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Average time spent into each column') ?></h2> + </div> +<?php endif ?> <?php if (empty($metrics)): ?> <p class="alert"><?= t('Not enough data to show the graph.') ?></p> @@ -11,16 +13,16 @@ )) ?> <table class="table-striped"> - <tr> - <th><?= t('Column') ?></th> - <th><?= t('Average time spent') ?></th> - </tr> - <?php foreach ($metrics as $column): ?> - <tr> - <td><?= $this->text->e($column['title']) ?></td> - <td><?= $this->dt->duration($column['average']) ?></td> - </tr> - <?php endforeach ?> + <tr> + <th><?= t('Column') ?></th> + <th><?= t('Average time spent') ?></th> + </tr> + <?php foreach ($metrics as $column): ?> + <tr> + <td><?= $this->text->e($column['title']) ?></td> + <td><?= $this->dt->duration($column['average']) ?></td> + </tr> + <?php endforeach ?> </table> <p class="alert alert-info"> diff --git a/app/Template/analytic/burndown.php b/app/Template/analytic/burndown.php index 674c76dd..d62c9ba0 100644 --- a/app/Template/analytic/burndown.php +++ b/app/Template/analytic/burndown.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Burndown chart') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Burndown chart') ?></h2> + </div> +<?php endif ?> <?php if (! $display_graph): ?> <p class="alert"><?= t('You need at least 2 days of data to show the chart.') ?></p> @@ -15,20 +17,10 @@ <hr/> <form method="post" class="form-inline" action="<?= $this->url->href('AnalyticController', 'burndown', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - - <div class="form-inline-group"> - <?= $this->form->date(t('Start date'), 'from', $values) ?> - </div> - - <div class="form-inline-group"> - <?= $this->form->date(t('End date'), 'to', $values) ?> - </div> - - <div class="form-inline-group"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> - </div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> + <?= $this->modal->submitButtons(array('submitLabel' => t('Execute'))) ?> </form> <p class="alert alert-info"><?= t('This chart show the task complexity over the time (Work Remaining).') ?></p> diff --git a/app/Template/analytic/cfd.php b/app/Template/analytic/cfd.php index 5eb42e82..dcd7b58f 100644 --- a/app/Template/analytic/cfd.php +++ b/app/Template/analytic/cfd.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Cumulative flow diagram') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Cumulative flow diagram') ?></h2> + </div> +<?php endif ?> <?php if (! $display_graph): ?> <p class="alert"><?= t('You need at least 2 days of data to show the chart.') ?></p> @@ -14,18 +16,8 @@ <hr/> <form method="post" class="form-inline" action="<?= $this->url->href('AnalyticController', 'cfd', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - - <div class="form-inline-group"> - <?= $this->form->date(t('Start date'), 'from', $values) ?> - </div> - - <div class="form-inline-group"> - <?= $this->form->date(t('End date'), 'to', $values) ?> - </div> - - <div class="form-inline-group"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> - </div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> + <?= $this->modal->submitButtons(array('submitLabel' => t('Execute'))) ?> </form> diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php index e3c6099f..7159094c 100644 --- a/app/Template/analytic/layout.php +++ b/app/Template/analytic/layout.php @@ -1,10 +1,14 @@ -<section id="main"> +<?php if ($is_ajax): ?> + <div class="page-header"> + <h2><?= $title ?></h2> + </div> +<?php else: ?> <?= $this->projectHeader->render($project, 'TaskListController', 'show') ?> - <section class="sidebar-container"> - <?= $this->render($sidebar_template, array('project' => $project)) ?> +<?php endif ?> +<section class="sidebar-container"> + <?= $this->render($sidebar_template, array('project' => $project)) ?> - <div class="sidebar-content"> - <?= $content_for_sublayout ?> - </div> - </section> + <div class="sidebar-content"> + <?= $content_for_sublayout ?> + </div> </section> diff --git a/app/Template/analytic/lead_cycle_time.php b/app/Template/analytic/lead_cycle_time.php index 8884a441..780b47b6 100644 --- a/app/Template/analytic/lead_cycle_time.php +++ b/app/Template/analytic/lead_cycle_time.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Average Lead and Cycle time') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Average Lead and Cycle time') ?></h2> + </div> +<?php endif ?> <div class="panel"> <ul> @@ -19,20 +21,10 @@ )) ?> <form method="post" class="form-inline" action="<?= $this->url->href('AnalyticController', 'leadAndCycleTime', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - - <div class="form-inline-group"> - <?= $this->form->date(t('Start date'), 'from', $values) ?> - </div> - - <div class="form-inline-group"> - <?= $this->form->date(t('End date'), 'to', $values) ?> - </div> - - <div class="form-inline-group"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> - </div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> + <?= $this->modal->submitButtons(array('submitLabel' => t('Execute'))) ?> </form> <p class="alert alert-info"> diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php index f768a11d..d5ce88cb 100644 --- a/app/Template/analytic/sidebar.php +++ b/app/Template/analytic/sidebar.php @@ -1,28 +1,27 @@ <div class="sidebar"> <ul> <li <?= $this->app->checkMenuSelection('AnalyticController', 'taskDistribution') ?>> - <?= $this->url->link(t('Task distribution'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Task distribution'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'userDistribution') ?>> - <?= $this->url->link(t('User repartition'), 'AnalyticController', 'userDistribution', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('User repartition'), 'AnalyticController', 'userDistribution', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'cfd') ?>> - <?= $this->url->link(t('Cumulative flow diagram'), 'AnalyticController', 'cfd', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Cumulative flow diagram'), 'AnalyticController', 'cfd', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'burndown') ?>> - <?= $this->url->link(t('Burndown chart'), 'AnalyticController', 'burndown', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Burndown chart'), 'AnalyticController', 'burndown', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'averageTimeByColumn') ?>> - <?= $this->url->link(t('Average time into each column'), 'AnalyticController', 'averageTimeByColumn', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Average time into each column'), 'AnalyticController', 'averageTimeByColumn', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'leadAndCycleTime') ?>> - <?= $this->url->link(t('Lead and cycle time'), 'AnalyticController', 'leadAndCycleTime', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Lead and cycle time'), 'AnalyticController', 'leadAndCycleTime', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'timeComparison') ?>> - <?= $this->url->link(t('Estimated vs actual time'), 'AnalyticController', 'timeComparison', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Estimated vs actual time'), 'AnalyticController', 'timeComparison', array('project_id' => $project['id'])) ?> </li> <?= $this->hook->render('template:analytic:sidebar', array('project' => $project)) ?> - </ul> </div> diff --git a/app/Template/analytic/task_distribution.php b/app/Template/analytic/task_distribution.php index 1231856e..671d462f 100644 --- a/app/Template/analytic/task_distribution.php +++ b/app/Template/analytic/task_distribution.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Task distribution') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Task distribution') ?></h2> + </div> +<?php endif ?> <?php if (empty($metrics)): ?> <p class="alert"><?= t('Not enough data to show the graph.') ?></p> diff --git a/app/Template/analytic/time_comparison.php b/app/Template/analytic/time_comparison.php index c949f2c8..754c68f2 100644 --- a/app/Template/analytic/time_comparison.php +++ b/app/Template/analytic/time_comparison.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Estimated vs actual time') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Estimated vs actual time') ?></h2> + </div> +<?php endif ?> <div class="panel"> <ul> @@ -27,9 +29,9 @@ <tr> <th class="column-5"><?= $paginator->order(t('Id'), 'tasks.id') ?></th> <th><?= $paginator->order(t('Title'), 'tasks.title') ?></th> - <th class="column-5"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th> - <th class="column-10"><?= $paginator->order(t('Estimated Time'), 'tasks.time_estimated') ?></th> - <th class="column-10"><?= $paginator->order(t('Actual Time'), 'tasks.time_spent') ?></th> + <th class="column-10"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th> + <th class="column-12"><?= $paginator->order(t('Estimated Time'), 'tasks.time_estimated') ?></th> + <th class="column-12"><?= $paginator->order(t('Actual Time'), 'tasks.time_spent') ?></th> </tr> <?php foreach ($paginator->getCollection() as $task): ?> <tr> diff --git a/app/Template/analytic/user_distribution.php b/app/Template/analytic/user_distribution.php index 76ac945c..cae6fa57 100644 --- a/app/Template/analytic/user_distribution.php +++ b/app/Template/analytic/user_distribution.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('User repartition') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('User repartition') ?></h2> + </div> +<?php endif ?> <?php if (empty($metrics)): ?> <p class="alert"><?= t('Not enough data to show the graph.') ?></p> |