summaryrefslogtreecommitdiff
path: root/app/Controller/Config.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-16 21:04:46 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-16 21:04:46 -0400
commite94a2f6a00b59a6e2b63d461794b01a2b9d07473 (patch)
tree4e097bcad8f070515dcf9a0edf1af5acef0305aa /app/Controller/Config.php
parentb028b3586c5022753e9ff390a042aac9f5b863f4 (diff)
Display tasks in the calendar + improve settings
Diffstat (limited to 'app/Controller/Config.php')
-rw-r--r--app/Controller/Config.php45
1 files changed, 39 insertions, 6 deletions
diff --git a/app/Controller/Config.php b/app/Controller/Config.php
index c17b9f64..fbd374ab 100644
--- a/app/Controller/Config.php
+++ b/app/Controller/Config.php
@@ -40,11 +40,16 @@ class Config extends Base
$values = $this->request->getValues();
- if ($redirect === 'board') {
- $values += array('subtask_restriction' => 0, 'subtask_time_tracking' => 0, 'subtask_forecast' => 0);
- }
- else if ($redirect === 'integrations') {
- $values += array('integration_slack_webhook' => 0, 'integration_hipchat' => 0, 'integration_gravatar' => 0, 'integration_jabber' => 0);
+ switch ($redirect) {
+ case 'project':
+ $values += array('subtask_restriction' => 0, 'subtask_time_tracking' => 0);
+ break;
+ case 'integrations':
+ $values += array('integration_slack_webhook' => 0, 'integration_hipchat' => 0, 'integration_gravatar' => 0, 'integration_jabber' => 0);
+ break;
+ case 'calendar':
+ $values += array('calendar_user_subtasks_forecast' => 0, 'calendar_user_subtasks_time_tracking' => 0);
+ break;
}
if ($this->config->save($values)) {
@@ -90,6 +95,21 @@ class Config extends Base
}
/**
+ * Display the project settings page
+ *
+ * @access public
+ */
+ public function project()
+ {
+ $this->common('project');
+
+ $this->response->html($this->layout('config/project', array(
+ 'default_columns' => implode(', ', $this->board->getDefaultColumns()),
+ 'title' => t('Settings').' &gt; '.t('Project settings'),
+ )));
+ }
+
+ /**
* Display the board settings page
*
* @access public
@@ -99,12 +119,25 @@ class Config extends Base
$this->common('board');
$this->response->html($this->layout('config/board', array(
- 'default_columns' => implode(', ', $this->board->getDefaultColumns()),
'title' => t('Settings').' &gt; '.t('Board settings'),
)));
}
/**
+ * Display the calendar settings page
+ *
+ * @access public
+ */
+ public function calendar()
+ {
+ $this->common('calendar');
+
+ $this->response->html($this->layout('config/calendar', array(
+ 'title' => t('Settings').' &gt; '.t('Calendar settings'),
+ )));
+ }
+
+ /**
* Display the integration settings page
*
* @access public