diff --git a/app/Controller/ColumnController.php b/app/Controller/ColumnController.php index e3f9bffff..d3f0e36e5 100644 --- a/app/Controller/ColumnController.php +++ b/app/Controller/ColumnController.php @@ -66,7 +66,15 @@ class ColumnController extends BaseController list($valid, $errors) = $this->columnValidator->validateCreation($values); if ($valid) { - if ($this->columnModel->create($project['id'], $values['title'], $values['task_limit'], $values['description'], $values['hide_in_dashboard']) !== false) { + $result = $this->columnModel->create( + $project['id'], + $values['title'], + $values['task_limit'], + $values['description'], + isset($values['hide_in_dashboard']) ? $values['hide_in_dashboard'] : 0 + ); + + if ($result !== false) { $this->flash->success(t('Column created successfully.')); return $this->response->redirect($this->helper->url->to('ColumnController', 'index', array('project_id' => $project['id'])), true); } else { @@ -111,7 +119,15 @@ class ColumnController extends BaseController list($valid, $errors) = $this->columnValidator->validateModification($values); if ($valid) { - if ($this->columnModel->update($values['id'], $values['title'], $values['task_limit'], $values['description'], $values['hide_in_dashboard']) !== false) { + $result = $this->columnModel->update( + $values['id'], + $values['title'], + $values['task_limit'], + $values['description'], + isset($values['hide_in_dashboard']) ? $values['hide_in_dashboard'] : 0 + ); + + if ($result) { $this->flash->success(t('Board updated successfully.')); return $this->response->redirect($this->helper->url->to('ColumnController', 'index', array('project_id' => $project['id']))); } else { diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php index e3c292619..5f5133474 100644 --- a/app/Locale/bs_BA/translations.php +++ b/app/Locale/bs_BA/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index ce66eee55..1c28f4f97 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index f9bc00315..abebd3946 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index d3192f463..f569206ba 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -1216,5 +1216,5 @@ return array( 'Global tags' => 'Globale Schlagwörter', 'There is no global tag at the moment.' => 'Es gibt zur Zeit kein globales Schlagwort', 'This field cannot be empty' => 'Dieses Feld kann nicht leer sein', - 'Hide tasks in this column in the Dashboard' => 'Aufgaben in dieser Spalte im Dashboard ausblenden', + 'Hide tasks in this column in the dashboard' => 'Aufgaben in dieser Spalte im Dashboard ausblenden', ); diff --git a/app/Locale/el_GR/translations.php b/app/Locale/el_GR/translations.php index 745acaea8..c1d7c5797 100644 --- a/app/Locale/el_GR/translations.php +++ b/app/Locale/el_GR/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 604a5e3ed..5699ce6ff 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 73b65463d..6fe4852c0 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index e3ee8a4b7..7663da0f6 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -1217,5 +1217,5 @@ return array( 'Global tags' => 'Libellés globaux', 'There is no global tag at the moment.' => 'Il n\'y a aucun libellé global pour le moment.', 'This field cannot be empty' => 'Ce champ ne peut être vide', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 9acdbd1a8..96db72eff 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php index d8c42cf44..2d6e5aa35 100644 --- a/app/Locale/id_ID/translations.php +++ b/app/Locale/id_ID/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 9d2af814b..e10b61dac 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -1216,5 +1216,5 @@ return array( 'Global tags' => 'Tag globali', 'There is no global tag at the moment.' => 'Non sono definiti tag globali al momento.', 'This field cannot be empty' => 'Questo campo non può essere vuoto', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index 9f6ab88f5..2fe13ac92 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/ko_KR/translations.php b/app/Locale/ko_KR/translations.php index f48b74868..bd25d11f4 100644 --- a/app/Locale/ko_KR/translations.php +++ b/app/Locale/ko_KR/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/my_MY/translations.php b/app/Locale/my_MY/translations.php index bad6d9192..ff8960aa4 100644 --- a/app/Locale/my_MY/translations.php +++ b/app/Locale/my_MY/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index 193724193..8752a1597 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index 8ba0d3943..e07ea32c7 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - //' Hide tasks in this column in the Dashboard' => '', + //' Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index 09c247d89..896d2ed43 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 7659ba2b8..40f3bb4d2 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index 1f9a70307..08375ad02 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -1216,5 +1216,5 @@ return array( 'Global tags' => 'Etiquetas globais', 'There is no global tag at the moment.' => 'De momento não existe nenhuma etiqueta global.', // 'This field cannot be empty' => '', - //'Hide tasks in this column in the Dashboard' => '', + //'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index fe9501729..c6285f6a6 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -1216,5 +1216,5 @@ return array( 'Global tags' => 'Глобальные метка', 'There is no global tag at the moment.' => 'Нет глобальных меток.', 'This field cannot be empty' => 'Это поле не может быть пустым', - 'Hide tasks in this column in the Dashboard' => 'Не показывать задачи из этой колонки в кабинете', + 'Hide tasks in this column in the dashboard' => 'Не показывать задачи из этой колонки в кабинете', ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index 7aec71422..92ed34245 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index bce1ccfbb..eedcf0fc7 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 48a0b3def..a6de8bcef 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index b25ef1227..35e296496 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index d000b706f..0ef01ef71 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -1216,5 +1216,5 @@ return array( // 'Global tags' => '', // 'There is no global tag at the moment.' => '', // 'This field cannot be empty' => '', - // 'Hide tasks in this column in the Dashboard' => '', + // 'Hide tasks in this column in the dashboard' => '', ); diff --git a/app/Model/ColumnModel.php b/app/Model/ColumnModel.php index 0a9c55a87..5498ef542 100644 --- a/app/Model/ColumnModel.php +++ b/app/Model/ColumnModel.php @@ -138,11 +138,12 @@ class ColumnModel extends Base * Add a new column to the board * * @access public - * @param integer $project_id Project id - * @param string $title Column title - * @param integer $task_limit Task limit - * @param string $description Column description - * @return boolean|integer + * @param integer $project_id Project id + * @param string $title Column title + * @param integer $task_limit Task limit + * @param string $description Column description + * @param integer $hide_in_dashboard + * @return bool|int */ public function create($project_id, $title, $task_limit = 0, $description = '', $hide_in_dashboard = 0) { @@ -166,6 +167,7 @@ class ColumnModel extends Base * @param string $title Column title * @param integer $task_limit Task limit * @param string $description Optional description + * @param integer $hide_in_dashboard * @return boolean */ public function update($column_id, $title, $task_limit = 0, $description = '', $hide_in_dashboard = 0) diff --git a/app/Schema/Sql/mysql.sql b/app/Schema/Sql/mysql.sql index 8d2f2dc07..67dd170a2 100644 --- a/app/Schema/Sql/mysql.sql +++ b/app/Schema/Sql/mysql.sql @@ -44,8 +44,8 @@ CREATE TABLE `columns` ( `position` int(11) NOT NULL, `project_id` int(11) NOT NULL, `task_limit` int(11) DEFAULT '0', - `hide_in_dashboard` int(11) DEFAULT '0', `description` text, + `hide_in_dashboard` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `idx_title_project` (`title`,`project_id`), KEY `columns_project_idx` (`project_id`), @@ -700,4 +700,4 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$Kv6fus67I/ZG/3LYJ7bRLeis8bk8455Lwtu12ElgnGm3lhRs/z7Ni', 'app-admin');INSERT INTO schema_version VALUES ('111'); +INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$g28mYPBdsf3/gX/ayd7A8.HSPBRQ/zM/PXlfijelJhXwhnukCRIDi', 'app-admin');INSERT INTO schema_version VALUES ('112'); diff --git a/app/Schema/Sql/postgres.sql b/app/Schema/Sql/postgres.sql index ae8b4fd5d..5b4142b78 100644 --- a/app/Schema/Sql/postgres.sql +++ b/app/Schema/Sql/postgres.sql @@ -98,8 +98,8 @@ CREATE TABLE "columns" ( "position" integer, "project_id" integer NOT NULL, "task_limit" integer DEFAULT 0, - "hide_in_dashboard" integer DEFAULT 0, - "description" "text" + "description" "text", + "hide_in_dashboard" boolean DEFAULT false ); @@ -2243,7 +2243,8 @@ INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('board_high INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('board_public_refresh_interval', '60', 0, 0); INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('board_private_refresh_interval', '10', 0, 0); INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('board_columns', '', 0, 0); -INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('webhook_token', '1aff324d30632aaed0d4f4dc1281be0d5bbc7b4fcddccc4badcd6c8f3d43', 0, 0); +INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('webhook_token', 'c9a7c2a4523f1724b2ca047c5685f8e2b26bba47eb69baf4f22d5d50d837', 0, 0); +INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('api_token', 'c57a6cb1789269547b616454e4e2f06d3de0514f83baf8fa5b5a8af44a08', 0, 0); INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('application_language', 'en_US', 0, 0); INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('application_timezone', 'UTC', 0, 0); INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('application_url', '', 0, 0); @@ -2261,7 +2262,6 @@ INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('default_co INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('subtask_time_tracking', '1', 0, 0); INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('cfd_include_closed_tasks', '1', 0, 0); INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('password_reset', '1', 0, 0); -INSERT INTO settings (option, value, changed_by, changed_on) VALUES ('api_token', '19ffd9709d03ce50675c3a43d1c49c1ac207f4bc45f06c5b2701fbdf8929', 0, 0); -- @@ -2313,4 +2313,4 @@ SELECT pg_catalog.setval('links_id_seq', 11, true); -- PostgreSQL database dump complete -- -INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$Kv6fus67I/ZG/3LYJ7bRLeis8bk8455Lwtu12ElgnGm3lhRs/z7Ni', 'app-admin');INSERT INTO schema_version VALUES ('90'); +INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$g28mYPBdsf3/gX/ayd7A8.HSPBRQ/zM/PXlfijelJhXwhnukCRIDi', 'app-admin');INSERT INTO schema_version VALUES ('91'); diff --git a/app/Template/column/create.php b/app/Template/column/create.php index 387b6a476..812e9139d 100644 --- a/app/Template/column/create.php +++ b/app/Template/column/create.php @@ -13,7 +13,7 @@ = $this->form->label(t('Task limit'), 'task_limit') ?> = $this->form->number('task_limit', $values, $errors) ?> - = $this->form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the Dashboard'), 1) ?> + = $this->form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the dashboard'), 1) ?> = $this->form->label(t('Description'), 'description') ?> = $this->form->textarea('description', $values, $errors, array(), 'markdown-editor') ?> diff --git a/app/Template/column/edit.php b/app/Template/column/edit.php index abd701190..89487298b 100644 --- a/app/Template/column/edit.php +++ b/app/Template/column/edit.php @@ -15,7 +15,7 @@ = $this->form->label(t('Task limit'), 'task_limit') ?> = $this->form->number('task_limit', $values, $errors) ?> - = $this->form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the Dashboard'), 1, $values['hide_in_dashboard'] == 1) ?> + = $this->form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the dashboard'), 1, $values['hide_in_dashboard'] == 1) ?> = $this->form->label(t('Description'), 'description') ?> = $this->form->textarea('description', $values, $errors, array(), 'markdown-editor') ?> diff --git a/app/Template/project_view/show.php b/app/Template/project_view/show.php index 0ad8852b9..667a576cf 100644 --- a/app/Template/project_view/show.php +++ b/app/Template/project_view/show.php @@ -57,7 +57,7 @@