From dedf425e8168b2c38e8566a3d407f77fb11cc001 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Tue, 24 Feb 2015 14:20:34 +0100 Subject: Add project description field. Description is shown in a popup when hovering the 'information' icon, like column description, which is shown in project list on dashboard and in board's title. This is useful to document the categories and colors used in the project. --- app/Controller/Board.php | 2 ++ app/Schema/Mysql.php | 7 ++++++- app/Schema/Postgres.php | 7 ++++++- app/Schema/Sqlite.php | 7 ++++++- app/Template/app/projects.php | 10 ++++++++-- app/Template/layout.php | 8 +++++++- app/Template/project/edit.php | 23 ++++++++++++++++++++++- app/Template/project/index.php | 8 +++++++- app/Template/project/show.php | 10 ++++++++++ docs/api-json-rpc.markdown | 14 ++++++++++---- jsonrpc.php | 10 +++++++--- 11 files changed, 91 insertions(+), 15 deletions(-) diff --git a/app/Controller/Board.php b/app/Controller/Board.php index 90b7f357..a6e002f2 100644 --- a/app/Controller/Board.php +++ b/app/Controller/Board.php @@ -127,6 +127,7 @@ class Board extends Base 'swimlanes' => $this->board->getBoard($project['id']), 'categories' => $this->category->getList($project['id'], false), 'title' => $project['name'], + 'description' => $project['description'], 'no_layout' => true, 'not_editable' => true, 'board_public_refresh_interval' => $this->config->get('board_public_refresh_interval'), @@ -187,6 +188,7 @@ class Board extends Base 'swimlanes' => $this->board->getBoard($project['id']), 'categories' => $this->category->getList($project['id'], true, true), 'title' => $project['name'], + 'description' => $project['description'], 'board_selector' => $board_selector, 'board_private_refresh_interval' => $this->config->get('board_private_refresh_interval'), 'board_highlight_period' => $this->config->get('board_highlight_period'), diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 947a62b3..eeab24d6 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,12 @@ use PDO; use Core\Security; use Model\Link; -const VERSION = 46; +const VERSION = 47; + +function version_47($pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN description TEXT'); +} function version_46($pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 027401ff..c3e8fbda 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -6,7 +6,12 @@ use PDO; use Core\Security; use Model\Link; -const VERSION = 27; +const VERSION = 28; + +function version_28($pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN description TEXT'); +} function version_27($pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index c6dec33f..eefa0ae1 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -6,7 +6,12 @@ use Core\Security; use PDO; use Model\Link; -const VERSION = 45; +const VERSION = 46; + +function version_46($pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN description TEXT'); +} function version_45($pdo) { diff --git a/app/Template/app/projects.php b/app/Template/app/projects.php index 4740c4b8..c3a39a83 100644 --- a/app/Template/app/projects.php +++ b/app/Template/app/projects.php @@ -17,9 +17,15 @@ isManager($project['id'])): ?> a('', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Settings')) ?>  - + a('', 'calendar', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?>  + a($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?> + + + + + @@ -32,4 +38,4 @@ - \ No newline at end of file + diff --git a/app/Template/layout.php b/app/Template/layout.php index ad4c4084..7adb0559 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -35,7 +35,13 @@