summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-03-26 20:49:37 -0400
committerFrederic Guillot <fred@kanboard.net>2015-03-26 20:49:37 -0400
commitd3ae8d2acb218c8e1bc50ed1b92c19016e9214ee (patch)
tree1fbf207bb2e1f681f8477f4273f084ce9c64f727 /app/Controller
parent626ad566f718e0c0f63034ecc76604d22d4b2a06 (diff)
Display subtask estimates in the user calendar according to the timetable
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Calendar.php4
-rw-r--r--app/Controller/Config.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/app/Controller/Calendar.php b/app/Controller/Calendar.php
index 6cfa2bad..49c7f56e 100644
--- a/app/Controller/Calendar.php
+++ b/app/Controller/Calendar.php
@@ -82,7 +82,9 @@ class Calendar extends Base
$subtask_timeslots = $this->subtaskTimeTracking->getUserCalendarEvents($user_id, $start, $end);
- $this->response->json(array_merge($due_tasks, $subtask_timeslots));
+ $subtask_forcast = $this->config->get('subtask_forecast') == 1 ? $this->subtaskForecast->getCalendarEvents($user_id, $end) : array();
+
+ $this->response->json(array_merge($due_tasks, $subtask_timeslots, $subtask_forcast));
}
/**
diff --git a/app/Controller/Config.php b/app/Controller/Config.php
index bee897be..6f3bc43c 100644
--- a/app/Controller/Config.php
+++ b/app/Controller/Config.php
@@ -41,7 +41,7 @@ class Config extends Base
$values = $this->request->getValues();
if ($redirect === 'board') {
- $values += array('subtask_restriction' => 0, 'subtask_time_tracking' => 0);
+ $values += array('subtask_restriction' => 0, 'subtask_time_tracking' => 0, 'subtask_forecast' => 0);
}
if ($this->config->save($values)) {