From 67e430ad63b607ab175e55bf4870351cd4b73d3c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 5 May 2005 03:37:47 +0000 Subject: [PATCH] r90: Finished the bug status colouring --- admin/status.php | 9 ++++++--- docs/todo.txt | 1 - index.php | 1 + search.php | 1 + templates/default/trackerhome_bits.tpl | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/admin/status.php b/admin/status.php index 99bb5ad..ddde8e0 100755 --- a/admin/status.php +++ b/admin/status.php @@ -45,7 +45,7 @@ if ($_REQUEST['do'] == 'delete') if ($_POST['do'] == 'insert') { - $db->query("INSERT INTO " . TABLE_PREFIX . "status (status, displayorder) VALUES ('" . $bugsys->in['status'] . "', " . intval($bugsys->in['displayorder']) . ")"); + $db->query("INSERT INTO " . TABLE_PREFIX . "status (status, displayorder, color) VALUES ('" . $bugsys->in['status'] . "', " . intval($bugsys->in['displayorder']) . ", '" . $bugsys->in['color'] . "')"); build_statuses(); $admin->redirect('status.php?do=modify'); } @@ -61,6 +61,7 @@ if ($_REQUEST['do'] == 'add') $admin->table_head(phrase('new_status')); $admin->row_input(phrase('status_title'), 'status'); $admin->row_input(phrase('status_display_order'), 'displayorder'); + $admin->row_input(phraes('status_color'), 'color'); $admin->row_submit(); $admin->table_end(); $admin->form_end(); @@ -72,7 +73,7 @@ if ($_REQUEST['do'] == 'add') if ($_POST['do'] == 'update') { - $db->query("UPDATE " . TABLE_PREFIX . "status SET status = '" . $bugsys->in['status'] . "', displayorder = " . intval($bugsys->in['displayorder']) . " WHERE statusid = " . intval($bugsys->in['statusid'])); + $db->query("UPDATE " . TABLE_PREFIX . "status SET status = '" . $bugsys->in['status'] . "', displayorder = " . intval($bugsys->in['displayorder']) . ", color = '" . $bugsys->in['color'] . "' WHERE statusid = " . intval($bugsys->in['statusid'])); build_statuses(); $admin->redirect('status.php?do=modify'); } @@ -95,6 +96,7 @@ if ($_REQUEST['do'] == 'edit') $admin->table_head(phrase('edit_status_title', $status['status'], $status['statusid'])); $admin->row_input(phrase('status_title'), 'status', $status['status']); $admin->row_input(phrase('status_display_order'), 'displayorder', $status['displayorder']); + $admin->row_input(phrase('status_color'), 'color', $status['color']); $admin->row_submit(); $admin->table_end(); $admin->form_end(); @@ -116,7 +118,8 @@ if ($_REQUEST['do'] == 'modify') while ($status = $db->fetch_array($statuses)) { - $admin->row_text("$status[displayorder]: $status[status]", "(statusid: $status[statusid]) " . phrase('edit_wraplink') . " " . phrase('delete_wraplink') . ""); + $colourblock = '
'; + $admin->row_text("$colourblock$status[displayorder]: $status[status]", "(statusid: $status[statusid]) " . phrase('edit_wraplink') . " " . phrase('delete_wraplink') . ""); } $db->free_result($statuses); diff --git a/docs/todo.txt b/docs/todo.txt index 03f1603..8986469 100755 --- a/docs/todo.txt +++ b/docs/todo.txt @@ -9,7 +9,6 @@ BUGTRACK 1.0 ADMINISTRATION ---------------------------------------- - Frame-free navigation -- Bug status colour settings - PCV descriptions - Admin auto-actions - Custom bug fields diff --git a/index.php b/index.php index 25be5c7..b882b96 100644 --- a/index.php +++ b/index.php @@ -39,6 +39,7 @@ $bugs_fetch = $db->query(" while ($bug = $db->fetch_array($bugs_fetch)) { + $bug['bgcolour'] = $bugsys->datastore['status']["$bug[status]"]['color']; $bug['product'] = $bugsys->datastore['product']["$bug[productid]"]['title']; $bug['version'] = $bugsys->datastore['version']["$bug[versionid]"]['version']; $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status']; diff --git a/search.php b/search.php index a26703f..7f2db59 100644 --- a/search.php +++ b/search.php @@ -199,6 +199,7 @@ if ($_REQUEST['do'] == 'results') while ($bug = $db->fetch_array($search)) { + $bug['bgcolour'] = $bugsys->datastore['status']["$bug[status]"]['color']; $bug['product'] = $bugsys->datastore['product']["$bug[productid]"]['title']; $bug['version'] = $bugsys->datastore['version']["$bug[versionid]"]['version']; $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status']; diff --git a/templates/default/trackerhome_bits.tpl b/templates/default/trackerhome_bits.tpl index 844cfd6..712c1e9 100644 --- a/templates/default/trackerhome_bits.tpl +++ b/templates/default/trackerhome_bits.tpl @@ -1,4 +1,4 @@ - + $bug[bugid] $bug[summary] $bug[firstreport] -- 2.43.5