cvs: bugtracker /htdocs/elements screen.css /includes comment.php /notes gsoc_bugtracker.sql /template/generic/bug index.php
| From: | Barry Carlyon | Date: | Fri, 18 Jul 2008 08:31:39 +0000 |
| Subject: | cvs: bugtracker /htdocs/elements screen.css /includes comment.php /notes gsoc_bugtracker.sql /template/generic/bug index.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-2133@lists.php.net to get a copy of this message | ||
bcarlyon Fri Jul 18 08:31:39 2008 UTC
Added files:
/bugtracker/notes gsoc_bugtracker.sql
Modified files:
/bugtracker/htdocs/elements screen.css
/bugtracker/includes comment.php
/bugtracker/template/generic/bug index.php
Log:
Making Update for easy transfer to windows box for Londonvasion phpbb conference
So I can work whilst away
Bug display page has been redone and initial form comment form has been done
http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/elements/screen.css?r1=1.6&r2=1.7&diff_format=u Index: bugtracker/htdocs/elements/screen.css diff -u bugtracker/htdocs/elements/screen.css:1.6 bugtracker/htdocs/elements/screen.css:1.7 --- bugtracker/htdocs/elements/screen.css:1.6 Thu Jul 17 09:48:05 2008 +++ bugtracker/htdocs/elements/screen.css Fri Jul 18 08:31:38 2008 @@ -95,16 +95,17 @@ padding: 10px 0px 10px 0; } -.form input, .form select, .form textarea, .form #captcha { +form input, form select, form textarea, form #captcha { float: right; } -.form label { +form label { float: left; font-weight: 700; cursor: pointer; } .slim { - width: 550px; + /*width: 550px;*/ + width: 68%; } .form { width: 800px; @@ -146,6 +147,7 @@ } #description { border-top: 1px solid #000; + padding: 5px 2px; } .textAreaWithLines { http://cvs.php.net/viewvc.cgi/bugtracker/includes/comment.php?r1=1.5&r2=1.6&diff_format=u Index: bugtracker/includes/comment.php diff -u bugtracker/includes/comment.php:1.5 bugtracker/includes/comment.php:1.6 --- bugtracker/includes/comment.php:1.5 Thu Jul 17 09:48:05 2008 +++ bugtracker/includes/comment.php Fri Jul 18 08:31:39 2008 @@ -31,30 +31,45 @@ function delete_comment() { } function spawn_form() { - global $user,$content; + global $user,$content,$bug,$form_data; //generate a comment form - //test logged in + //generate template + $form_data['bug_id'] = isset($form_data['bug_id']) ? $form_data['bug_id'] : ''; + $form_data['comment_text'] = isset($form_data['comment_text']) ? $form_data['comment_text'] : ''; + $form_data['comment_type'] = isset($form_data['comment_type']) ? $form_data['comment_type'] : ''; + $form_data['handle'] = isset($form_data['handle']) ? $form_data['handle'] : ''; - $content .= ' + $form_content = ' <tr> <td style="text-align: center; border-top: 1px solid #000;"> Add Comment</td> <td colspan="3" style="border-top: 1px solid #000;"></td> </tr> -<tr> <td></td> <td colspan="3">'; +<tr> <td></td> <td colspan="3"> +<form action="/bug/comment/" method="post" name="comment" > + <input type="hidden" name="bug_id" value="' . $bug->bug_id . ' " /> +'; - if ($user->logged_in) + if (!$user->logged_in) { - $content .= ' -<form action="ARG" method="post"> - -</form> + $form_content .= '<p>You don't appear to be logged in</p><br />'; + //need to include a login block + $form_content .= ' + <p>If you hold a temporary account the password is that of the last bug you posted</p><br /> + <div class="slim"> + <label for="handle">Handle/Email:</label> <input type="text" name="handle" id="handle" value="{HANDLE}" /><br /><br /> + <label for="password">Password:</label> <input type="password" name="password" id="password" /><br /><br /> + </div> '; } - else - { - $content .= '<p>You don't appear to be logged in</p>'; - } -$content .= ' + +$form_content .= ' + <label for="comment_text">Comment</label> + <textarea name="comment_text" id="comment_text" rows="7" cols="55" >{COMMENT_TEXT}</textarea> + <input type="button" name="submit" value="Submit Comment" onclick="submit()" /> +</form> </td></tr> '; + + $content .= tpl_process($form_content, FALSE); + //dont want to process everything just the form_content return; } } http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/bug/index.php?r1=1.10&r2=1.11&diff_format=u Index: bugtracker/template/generic/bug/index.php diff -u bugtracker/template/generic/bug/index.php:1.10 bugtracker/template/generic/bug/index.php:1.11 --- bugtracker/template/generic/bug/index.php:1.10 Thu Jul 17 09:48:05 2008 +++ bugtracker/template/generic/bug/index.php Fri Jul 18 08:31:39 2008 @@ -41,7 +41,8 @@ } else { - $bug = $row; + $bug->bug_id = $bug_id; + $bug_row = $row; //get comments $query = "SELECT * FROM bug_comment WHERE bug_id = '{$bug_id}' AND ( comment_type = " . DESCRIPTION . ' OR comment_type = ' . REPRODUCE . ' OR comment_type = ' . EXPECTED . ' OR comment_type = ' . ACTUAL . ')'; @@ -51,35 +52,35 @@ { $comments[$comment_type[$entry['comment_type']]] = $entry['comment']; } - $bug = array_merge($bug, $comments); + $bug_row = array_merge($bug_row, $comments); $row['password'] = ''; - $template_data['page_title'] .= ' - #' . $bug['bug_id'] . ' ' . $bug['summary']; + $template_data['page_title'] .= ' - #' . $bug->bug_id . ' ' . $bug_row['summary']; $content .= '<h2>Bug Display</h2>'; $content .= ' <table id="bug"> -<tr> <td style="width: 100px;">Bug: #' . $bug['bug_id'] . '</td> <td colspan="2" style="width: 220px;">' . $bug['summary'] . '</td> <td style="width: 220px;">Reported By:<br /><strong>' . $bug['reported_by'] . '</strong></td> </tr> -<tr> <td><h4>' . $status[$bug['status']] . '</h4></td> <td style="width: 125px;">Opened:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(reported_on)']) . '</td> </tr>'; - if ($bug['UNIX_TIMESTAMP(updated)'] != $bug['UNIX_TIMESTAMP(reported_on)']) +<tr> <td style="width: 100px;">Bug: #' . $bug_row['bug_id'] . '</td> <td colspan="2" style="width: 220px;">' . $bug_row['summary'] . '</td> <td style="width: 220px;">Reported By:<br /><strong>' . $bug_row['reported_by'] . '</strong></td> </tr> +<tr> <td><h4>' . $status[$bug_row['status']] . '</h4></td> <td style="width: 125px;">Opened:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug_row['UNIX_TIMESTAMP(reported_on)']) . '</td> </tr>'; + if ($bug_row['UNIX_TIMESTAMP(updated)'] != $bug_row['UNIX_TIMESTAMP(reported_on)']) { - $content .= '<tr> <td></td> <td>Last Updated:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(updated)']) . '</td> </tr>'; + $content .= '<tr> <td></td> <td>Last Updated:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug_row['UNIX_TIMESTAMP(updated)']) . '</td> </tr>'; } - if ($bug['assigned_to']) + if ($bug_row['assigned_to']) { $content .= '<tr> <td></td> <td>Assigned To:</td> <td colspan="2"><strong>' . $row['assigned_to'] . '</strong></td> </tr> -<tr> <td></td> <td>Assigned On:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(assigned_on)']) . '</td> </tr>'; +<tr> <td></td> <td>Assigned On:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug_row['UNIX_TIMESTAMP(assigned_on)']) . '</td> </tr>'; } $content .= ' <tr> <td></td> <td colspan="2" style="text-align: right;">Version:</td> <td>' . $php_version[$row['php_version']] .'</td> </tr> <tr> <td></td> <td colspan="2" style="text-align: right;">Type:</td> <td>' . $bug_type[$row['bug_type']] . '</td> </tr> <tr> <td></td> <td colspan="2" style="text-align: right;">OS:</td> <td>' . $os_version[$row['os_version']] . '</td> </tr> -<tr id="description"> <td></td> <td colspan="3">' . $bug['description'] . '</td> </tr> +<tr> <td></td> <td colspan="3" id="description">' . $bug_row['description'] . '</td> </tr> '; //extra basic comments - if (isset($bug['reproduce'])) + if (isset($bug_row['reproduce'])) { $jsscripts[] = '/elements/js/lineno.js'; $content .= ' @@ -88,17 +89,17 @@ <br /><h5>Reproduce Code</h5> <a href="javascript:handleClick(\'reproduce_code\');handleClick(\'reproduce_link\');" class="lineno">Hide Code and Results</a> <a href="javascript:selectText(\'reproduce\');" title="Select Code" class="textselect">Select Code</a> - <a href="/bug/download/' . $bug['bug_id'] . '/" title="Download Code" class="textselect">Download</a> - <textarea id="reproduce" rows="7" cols="55">' . htmlentities($bug['reproduce']) . '</textarea> + <a href="/bug/download/' . $bug_row['bug_id'] . '/" title="Download Code" class="textselect">Download</a> + <textarea id="reproduce" rows="7" cols="55">' . htmlentities($bug_row['reproduce']) . '</textarea> <hr /> <br /> <h5>Expected Result</h5> - <textarea id="expected" rows="7" cols="55">' . $bug['expected'] . '</textarea> + <textarea id="expected" rows="7" cols="55">' . $bug_row['expected'] . '</textarea> <br /> <a href="javascript:createTextAreaWithLines(\'expected\');handleClick(\'expected_add\');" id="expected_add" class="lineno">Add Line Numbers</a> <hr /> <h5>Actaul Result</h5> - <textarea id="actual" rows="7" cols="55">' . $bug['actual'] . '</textarea> + <textarea id="actual" rows="7" cols="55">' . $bug_row['actual'] . '</textarea> <br /><a href="javascript:createTextAreaWithLines(\'actual\');handleClick(\'actual_add\');" id="actual_add" class="lineno">Add Line Numbers</a> </td></tr> '; @@ -112,7 +113,7 @@ '; $content .= '</table><br /><hr /><hr />'; - if (isset($bug['reproduce'])) + if (isset($bug_row['reproduce'])) { $content .= ' <script type="text/javascript"> http://cvs.php.net/viewvc.cgi/bugtracker/notes/gsoc_bugtracker.sql?view=markup&rev=1.1 Index: bugtracker/notes/gsoc_bugtracker.sql +++ bugtracker/notes/gsoc_bugtracker.sql -- phpMyAdmin SQL Dump -- version 2.11.6 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 18, 2008 at 09:27 AM -- Server version: 5.1.24 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `gsoc_bugtracker` -- -- -------------------------------------------------------- -- -- Table structure for table `account_type` -- DROP TABLE IF EXISTS `account_type`; CREATE TABLE IF NOT EXISTS `account_type` ( `account_type_id` int(11) NOT NULL AUTO_INCREMENT, `account_type_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`account_type_id`), UNIQUE KEY `account_type_text` (`account_type_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `account_type` -- INSERT INTO `account_type` (`account_type_id`, `account_type_text`, `ordering`) VALUES (1, 'Temp Account', 1), (2, 'User', 2); -- -------------------------------------------------------- -- -- Table structure for table `bug` -- DROP TABLE IF EXISTS `bug`; CREATE TABLE IF NOT EXISTS `bug` ( `bug_id` int(11) NOT NULL AUTO_INCREMENT, `status` int(2) NOT NULL, `bug_type` int(2) NOT NULL, `reported_by` varchar(50) NOT NULL, `reported_on` datetime NOT NULL, `assigned_to` varchar(50) DEFAULT NULL, `assigned_on` datetime NOT NULL, `closed_by` varchar(50) DEFAULT NULL, `closed_on` datetime NOT NULL, `php_version` int(11) NOT NULL, `os_version` int(11) NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `summary` varchar(100) NOT NULL, `password` varchar(32) DEFAULT NULL, PRIMARY KEY (`bug_id`), KEY `reported_by` (`reported_by`,`assigned_to`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `bug` -- INSERT INTO `bug` (`bug_id`, `status`, `bug_type`, `reported_by`, `reported_on`, `assigned_to`, `assigned_on`, `closed_by`, `closed_on`, `php_version`, `os_version`, `updated`, `summary`, `password`) VALUES (1, 3, 1, 'Tbarry_barrycarlyon', '2008-07-16 12:46:48', 'barrycarlyon', '2008-07-16 13:06:42', 'barrycarlyon', '2008-07-16 15:17:57', 0, 2, '2008-07-16 15:17:57', 'Javascript spaces title', 'a1b8585122e1ad60623d6a74d3eb3b6a'), (2, 0, 1, 'Tbarry_barrycarlyon', '2008-07-17 10:26:38', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', 1, 2, '2008-07-17 10:26:38', 'cake', 'bc13e533f78f5ab4ccbc8bdb0fa46709'); -- -------------------------------------------------------- -- -- Table structure for table `bug_comment` -- DROP TABLE IF EXISTS `bug_comment`; CREATE TABLE IF NOT EXISTS `bug_comment` ( `comment_id` int(11) NOT NULL AUTO_INCREMENT, `bug_id` int(11) NOT NULL, `comment` text NOT NULL, `comment_type` int(2) NOT NULL, `handle` varchar(20) NOT NULL, `added` datetime NOT NULL, `edited_by` varchar(20) NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`comment_id`), KEY `bug_id` (`bug_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; -- -- Dumping data for table `bug_comment` -- INSERT INTO `bug_comment` (`comment_id`, `bug_id`, `comment`, `comment_type`, `handle`, `added`, `edited_by`, `updated`) VALUES (1, 1, 'The javascript counter for characters left for summary aka title, breaks when a space is user and more characters are typed', 1, 'Tbarry_barrycarlyon', '2008-07-16 12:47:00', '', '2008-07-16 12:47:00'), (2, 2, 'This is a description', 1, 'Tbarry_barrycarlyon', '2008-07-17 10:26:42', '', '2008-07-17 10:26:42'), (3, 2, '<?php\r\n\r\n$world = ''yes there is one'';\r\n\r\necho $world;\r\n\r\n?>', 2, 'Tbarry_barrycarlyon', '2008-07-17 10:26:42', '', '2008-07-17 10:26:42'), (4, 2, 'yes there is one', 3, 'Tbarry_barrycarlyon', '2008-07-17 10:26:42', '', '2008-07-17 10:26:42'), (5, 2, 'yes there is none', 4, 'Tbarry_barrycarlyon', '2008-07-17 10:26:42', '', '2008-07-17 10:26:42'); -- -------------------------------------------------------- -- -- Table structure for table `bug_type` -- DROP TABLE IF EXISTS `bug_type`; CREATE TABLE IF NOT EXISTS `bug_type` ( `bug_type_id` int(11) NOT NULL AUTO_INCREMENT, `bug_type_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`bug_type_id`), UNIQUE KEY `bug_type_text` (`bug_type_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `bug_type` -- INSERT INTO `bug_type` (`bug_type_id`, `bug_type_text`, `ordering`) VALUES (1, 'Bug System', 1), (2, 'Doc', 2); -- -------------------------------------------------------- -- -- Table structure for table `comment_type` -- DROP TABLE IF EXISTS `comment_type`; CREATE TABLE IF NOT EXISTS `comment_type` ( `comment_type_id` int(11) NOT NULL AUTO_INCREMENT, `comment_type_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`comment_type_id`), UNIQUE KEY `comment_type_text` (`comment_type_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `comment_type` -- INSERT INTO `comment_type` (`comment_type_id`, `comment_type_text`, `ordering`) VALUES (1, 'description', 1), (2, 'reproduce', 2), (3, 'expected', 3), (4, 'actual', 4); -- -------------------------------------------------------- -- -- Table structure for table `configuration` -- DROP TABLE IF EXISTS `configuration`; CREATE TABLE IF NOT EXISTS `configuration` ( `conf_id` int(11) NOT NULL AUTO_INCREMENT, `conf_name` varchar(255) NOT NULL, `conf_data` varchar(255) NOT NULL, `update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`conf_id`), UNIQUE KEY `conf_name` (`conf_name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -- Dumping data for table `configuration` -- INSERT INTO `configuration` (`conf_id`, `conf_name`, `conf_data`, `update`) VALUES (1, 'mode', '0', '2008-06-04 12:36:33'); -- -------------------------------------------------------- -- -- Table structure for table `os_version` -- DROP TABLE IF EXISTS `os_version`; CREATE TABLE IF NOT EXISTS `os_version` ( `os_version_id` int(11) NOT NULL AUTO_INCREMENT, `os_version_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`os_version_id`), UNIQUE KEY `os_version_text` (`os_version_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `os_version` -- INSERT INTO `os_version` (`os_version_id`, `os_version_text`, `ordering`) VALUES (1, 'Linux', 1), (2, 'W1nd0w5', 2); -- -------------------------------------------------------- -- -- Table structure for table `php_version` -- DROP TABLE IF EXISTS `php_version`; CREATE TABLE IF NOT EXISTS `php_version` ( `php_version_id` int(11) NOT NULL AUTO_INCREMENT, `php_version_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`php_version_id`), UNIQUE KEY `php_version_text` (`php_version_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; -- -- Dumping data for table `php_version` -- INSERT INTO `php_version` (`php_version_id`, `php_version_text`, `ordering`) VALUES (1, '5.2.6', 1), (2, '4.4.8', 2), (3, '4CVS-2008-06-27 (snap)', 3), (4, '4CVS-2008-06-27 (CVS)', 4), (5, '5.2CVS-2008-06-27 (CVS)', 5), (6, '5.3CVS-2008-06-27 (snap)', 6), (7, '6CVS-2008-06-27 (snap)', 7), (8, '6CVS-2008-06-27 (CVS)', 8); -- -------------------------------------------------------- -- -- Table structure for table `status` -- DROP TABLE IF EXISTS `status`; CREATE TABLE IF NOT EXISTS `status` ( `status_id` int(11) NOT NULL AUTO_INCREMENT, `status_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`status_id`), UNIQUE KEY `status_text` (`status_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `status` -- INSERT INTO `status` (`status_id`, `status_text`, `ordering`) VALUES (1, 'Pending', 0), (2, 'Bogus', 1), (3, 'Is Bug', 2), (4, 'Fixed', 3); -- -------------------------------------------------------- -- -- Table structure for table `temp_account` -- DROP TABLE IF EXISTS `temp_account`; CREATE TABLE IF NOT EXISTS `temp_account` ( `handle` varchar(20) NOT NULL, `email` varchar(100) NOT NULL, `password` varchar(32) NOT NULL, `registered` datetime NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`handle`), KEY `email` (`email`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `temp_account` -- -- -------------------------------------------------------- -- -- Table structure for table `user` -- DROP TABLE IF EXISTS `user`; CREATE TABLE IF NOT EXISTS `user` ( `handle` varchar(20) NOT NULL, `account_type` int(11) NOT NULL DEFAULT '1', `password` varchar(32) DEFAULT NULL, `email` varchar(100) NOT NULL, `registered` datetime NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `website` varchar(255) NOT NULL, PRIMARY KEY (`handle`), KEY `email` (`email`,`handle`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- INSERT INTO `user` (`handle`, `account_type`, `password`, `email`, `registered`, `updated`, `website`) VALUES ('barrycarlyon', 2, 'a1b8585122e1ad60623d6a74d3eb3b6a', 'barry@barrycarlyon.co.uk', '2008-07-16 12:51:56', '2008-07-16 12:53:43', 'http://barrycarlyon.co.uk/'); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/elements/screen.css?r1=1.6&r2=1.7&diff_format=u Index: bugtracker/htdocs/elements/screen.css diff -u bugtracker/htdocs/elements/screen.css:1.6 bugtracker/htdocs/elements/screen.css:1.7 --- bugtracker/htdocs/elements/screen.css:1.6 Thu Jul 17 09:48:05 2008 +++ bugtracker/htdocs/elements/screen.css Fri Jul 18 08:31:38 2008 @@ -95,16 +95,17 @@ padding: 10px 0px 10px 0; } -.form input, .form select, .form textarea, .form #captcha { +form input, form select, form textarea, form #captcha { float: right; } -.form label { +form label { float: left; font-weight: 700; cursor: pointer; } .slim { - width: 550px; + /*width: 550px;*/ + width: 68%; } .form { width: 800px; @@ -146,6 +147,7 @@ } #description { border-top: 1px solid #000; + padding: 5px 2px; } .textAreaWithLines { http://cvs.php.net/viewvc.cgi/bugtracker/includes/comment.php?r1=1.5&r2=1.6&diff_format=u Index: bugtracker/includes/comment.php diff -u bugtracker/includes/comment.php:1.5 bugtracker/includes/comment.php:1.6 --- bugtracker/includes/comment.php:1.5 Thu Jul 17 09:48:05 2008 +++ bugtracker/includes/comment.php Fri Jul 18 08:31:39 2008 @@ -31,30 +31,45 @@ function delete_comment() { } function spawn_form() { - global $user,$content; + global $user,$content,$bug,$form_data; //generate a comment form - //test logged in + //generate template + $form_data['bug_id'] = isset($form_data['bug_id']) ? $form_data['bug_id'] : ''; + $form_data['comment_text'] = isset($form_data['comment_text']) ? $form_data['comment_text'] : ''; + $form_data['comment_type'] = isset($form_data['comment_type']) ? $form_data['comment_type'] : ''; + $form_data['handle'] = isset($form_data['handle']) ? $form_data['handle'] : ''; - $content .= ' + $form_content = ' <tr> <td style="text-align: center; border-top: 1px solid #000;"> Add Comment</td> <td colspan="3" style="border-top: 1px solid #000;"></td> </tr> -<tr> <td></td> <td colspan="3">'; +<tr> <td></td> <td colspan="3"> +<form action="/bug/comment/" method="post" name="comment" > + <input type="hidden" name="bug_id" value="' . $bug->bug_id . ' " /> +'; - if ($user->logged_in) + if (!$user->logged_in) { - $content .= ' -<form action="ARG" method="post"> - -</form> + $form_content .= '<p>You don't appear to be logged in</p><br />'; + //need to include a login block + $form_content .= ' + <p>If you hold a temporary account the password is that of the last bug you posted</p><br /> + <div class="slim"> + <label for="handle">Handle/Email:</label> <input type="text" name="handle" id="handle" value="{HANDLE}" /><br /><br /> + <label for="password">Password:</label> <input type="password" name="password" id="password" /><br /><br /> + </div> '; } - else - { - $content .= '<p>You don't appear to be logged in</p>'; - } -$content .= ' + +$form_content .= ' + <label for="comment_text">Comment</label> + <textarea name="comment_text" id="comment_text" rows="7" cols="55" >{COMMENT_TEXT}</textarea> + <input type="button" name="submit" value="Submit Comment" onclick="submit()" /> +</form> </td></tr> '; + + $content .= tpl_process($form_content, FALSE); + //dont want to process everything just the form_content return; } } http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/bug/index.php?r1=1.10&r2=1.11&diff_format=u Index: bugtracker/template/generic/bug/index.php diff -u bugtracker/template/generic/bug/index.php:1.10 bugtracker/template/generic/bug/index.php:1.11 --- bugtracker/template/generic/bug/index.php:1.10 Thu Jul 17 09:48:05 2008 +++ bugtracker/template/generic/bug/index.php Fri Jul 18 08:31:39 2008 @@ -41,7 +41,8 @@ } else { - $bug = $row; + $bug->bug_id = $bug_id; + $bug_row = $row; //get comments $query = "SELECT * FROM bug_comment WHERE bug_id = '{$bug_id}' AND ( comment_type = " . DESCRIPTION . ' OR comment_type = ' . REPRODUCE . ' OR comment_type = ' . EXPECTED . ' OR comment_type = ' . ACTUAL . ')'; @@ -51,35 +52,35 @@ { $comments[$comment_type[$entry['comment_type']]] = $entry['comment']; } - $bug = array_merge($bug, $comments); + $bug_row = array_merge($bug_row, $comments); $row['password'] = ''; - $template_data['page_title'] .= ' - #' . $bug['bug_id'] . ' ' . $bug['summary']; + $template_data['page_title'] .= ' - #' . $bug->bug_id . ' ' . $bug_row['summary']; $content .= '<h2>Bug Display</h2>'; $content .= ' <table id="bug"> -<tr> <td style="width: 100px;">Bug: #' . $bug['bug_id'] . '</td> <td colspan="2" style="width: 220px;">' . $bug['summary'] . '</td> <td style="width: 220px;">Reported By:<br /><strong>' . $bug['reported_by'] . '</strong></td> </tr> -<tr> <td><h4>' . $status[$bug['status']] . '</h4></td> <td style="width: 125px;">Opened:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(reported_on)']) . '</td> </tr>'; - if ($bug['UNIX_TIMESTAMP(updated)'] != $bug['UNIX_TIMESTAMP(reported_on)']) +<tr> <td style="width: 100px;">Bug: #' . $bug_row['bug_id'] . '</td> <td colspan="2" style="width: 220px;">' . $bug_row['summary'] . '</td> <td style="width: 220px;">Reported By:<br /><strong>' . $bug_row['reported_by'] . '</strong></td> </tr> +<tr> <td><h4>' . $status[$bug_row['status']] . '</h4></td> <td style="width: 125px;">Opened:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug_row['UNIX_TIMESTAMP(reported_on)']) . '</td> </tr>'; + if ($bug_row['UNIX_TIMESTAMP(updated)'] != $bug_row['UNIX_TIMESTAMP(reported_on)']) { - $content .= '<tr> <td></td> <td>Last Updated:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(updated)']) . '</td> </tr>'; + $content .= '<tr> <td></td> <td>Last Updated:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug_row['UNIX_TIMESTAMP(updated)']) . '</td> </tr>'; } - if ($bug['assigned_to']) + if ($bug_row['assigned_to']) { $content .= '<tr> <td></td> <td>Assigned To:</td> <td colspan="2"><strong>' . $row['assigned_to'] . '</strong></td> </tr> -<tr> <td></td> <td>Assigned On:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug['UNIX_TIMESTAMP(assigned_on)']) . '</td> </tr>'; +<tr> <td></td> <td>Assigned On:</td> <td colspan="2">' . date('d/m/Y H:i O',$bug_row['UNIX_TIMESTAMP(assigned_on)']) . '</td> </tr>'; } $content .= ' <tr> <td></td> <td colspan="2" style="text-align: right;">Version:</td> <td>' . $php_version[$row['php_version']] .'</td> </tr> <tr> <td></td> <td colspan="2" style="text-align: right;">Type:</td> <td>' . $bug_type[$row['bug_type']] . '</td> </tr> <tr> <td></td> <td colspan="2" style="text-align: right;">OS:</td> <td>' . $os_version[$row['os_version']] . '</td> </tr> -<tr id="description"> <td></td> <td colspan="3">' . $bug['description'] . '</td> </tr> +<tr> <td></td> <td colspan="3" id="description">' . $bug_row['description'] . '</td> </tr> '; //extra basic comments - if (isset($bug['reproduce'])) + if (isset($bug_row['reproduce'])) { $jsscripts[] = '/elements/js/lineno.js'; $content .= ' @@ -88,17 +89,17 @@ <br /><h5>Reproduce Code</h5> <a href="javascript:handleClick(\'reproduce_code\');handleClick(\'reproduce_link\');" class="lineno">Hide Code and Results</a> <a href="javascript:selectText(\'reproduce\');" title="Select Code" class="textselect">Select Code</a> - <a href="/bug/download/' . $bug['bug_id'] . '/" title="Download Code" class="textselect">Download</a> - <textarea id="reproduce" rows="7" cols="55">' . htmlentities($bug['reproduce']) . '</textarea> + <a href="/bug/download/' . $bug_row['bug_id'] . '/" title="Download Code" class="textselect">Download</a> + <textarea id="reproduce" rows="7" cols="55">' . htmlentities($bug_row['reproduce']) . '</textarea> <hr /> <br /> <h5>Expected Result</h5> - <textarea id="expected" rows="7" cols="55">' . $bug['expected'] . '</textarea> + <textarea id="expected" rows="7" cols="55">' . $bug_row['expected'] . '</textarea> <br /> <a href="javascript:createTextAreaWithLines(\'expected\');handleClick(\'expected_add\');" id="expected_add" class="lineno">Add Line Numbers</a> <hr /> <h5>Actaul Result</h5> - <textarea id="actual" rows="7" cols="55">' . $bug['actual'] . '</textarea> + <textarea id="actual" rows="7" cols="55">' . $bug_row['actual'] . '</textarea> <br /><a href="javascript:createTextAreaWithLines(\'actual\');handleClick(\'actual_add\');" id="actual_add" class="lineno">Add Line Numbers</a> </td></tr> '; @@ -112,7 +113,7 @@ '; $content .= '</table><br /><hr /><hr />'; - if (isset($bug['reproduce'])) + if (isset($bug_row['reproduce'])) { $content .= ' <script type="text/javascript"> http://cvs.php.net/viewvc.cgi/bugtracker/notes/gsoc_bugtracker.sql?view=markup&rev=1.1 Index: bugtracker/notes/gsoc_bugtracker.sql +++ bugtracker/notes/gsoc_bugtracker.sql -- phpMyAdmin SQL Dump -- version 2.11.6 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 18, 2008 at 09:27 AM -- Server version: 5.1.24 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `gsoc_bugtracker` -- -- -------------------------------------------------------- -- -- Table structure for table `account_type` -- DROP TABLE IF EXISTS `account_type`; CREATE TABLE IF NOT EXISTS `account_type` ( `account_type_id` int(11) NOT NULL AUTO_INCREMENT, `account_type_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`account_type_id`), UNIQUE KEY `account_type_text` (`account_type_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `account_type` -- INSERT INTO `account_type` (`account_type_id`, `account_type_text`, `ordering`) VALUES (1, 'Temp Account', 1), (2, 'User', 2); -- -------------------------------------------------------- -- -- Table structure for table `bug` -- DROP TABLE IF EXISTS `bug`; CREATE TABLE IF NOT EXISTS `bug` ( `bug_id` int(11) NOT NULL AUTO_INCREMENT, `status` int(2) NOT NULL, `bug_type` int(2) NOT NULL, `reported_by` varchar(50) NOT NULL, `reported_on` datetime NOT NULL, `assigned_to` varchar(50) DEFAULT NULL, `assigned_on` datetime NOT NULL, `closed_by` varchar(50) DEFAULT NULL, `closed_on` datetime NOT NULL, `php_version` int(11) NOT NULL, `os_version` int(11) NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `summary` varchar(100) NOT NULL, `password` varchar(32) DEFAULT NULL, PRIMARY KEY (`bug_id`), KEY `reported_by` (`reported_by`,`assigned_to`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `bug` -- INSERT INTO `bug` (`bug_id`, `status`, `bug_type`, `reported_by`, `reported_on`, `assigned_to`, `assigned_on`, `closed_by`, `closed_on`, `php_version`, `os_version`, `updated`, `summary`, `password`) VALUES (1, 3, 1, 'Tbarry_barrycarlyon', '2008-07-16 12:46:48', 'barrycarlyon', '2008-07-16 13:06:42', 'barrycarlyon', '2008-07-16 15:17:57', 0, 2, '2008-07-16 15:17:57', 'Javascript spaces title', 'a1b8585122e1ad60623d6a74d3eb3b6a'), (2, 0, 1, 'Tbarry_barrycarlyon', '2008-07-17 10:26:38', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', 1, 2, '2008-07-17 10:26:38', 'cake', 'bc13e533f78f5ab4ccbc8bdb0fa46709'); -- -------------------------------------------------------- -- -- Table structure for table `bug_comment` -- DROP TABLE IF EXISTS `bug_comment`; CREATE TABLE IF NOT EXISTS `bug_comment` ( `comment_id` int(11) NOT NULL AUTO_INCREMENT, `bug_id` int(11) NOT NULL, `comment` text NOT NULL, `comment_type` int(2) NOT NULL, `handle` varchar(20) NOT NULL, `added` datetime NOT NULL, `edited_by` varchar(20) NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`comment_id`), KEY `bug_id` (`bug_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; -- -- Dumping data for table `bug_comment` -- INSERT INTO `bug_comment` (`comment_id`, `bug_id`, `comment`, `comment_type`, `handle`, `added`, `edited_by`, `updated`) VALUES (1, 1, 'The javascript counter for characters left for summary aka title, breaks when a space is user and more characters are typed', 1, 'Tbarry_barrycarlyon', '2008-07-16 12:47:00', '', '2008-07-16 12:47:00'), (2, 2, 'This is a description', 1, 'Tbarry_barrycarlyon', '2008-07-17 10:26:42', '', '2008-07-17 10:26:42'), (3, 2, '<?php\r\n\r\n$world = ''yes there is one'';\r\n\r\necho $world;\r\n\r\n?>', 2, 'Tbarry_barrycarlyon', '2008-07-17 10:26:42', '', '2008-07-17 10:26:42'), (4, 2, 'yes there is one', 3, 'Tbarry_barrycarlyon', '2008-07-17 10:26:42', '', '2008-07-17 10:26:42'), (5, 2, 'yes there is none', 4, 'Tbarry_barrycarlyon', '2008-07-17 10:26:42', '', '2008-07-17 10:26:42'); -- -------------------------------------------------------- -- -- Table structure for table `bug_type` -- DROP TABLE IF EXISTS `bug_type`; CREATE TABLE IF NOT EXISTS `bug_type` ( `bug_type_id` int(11) NOT NULL AUTO_INCREMENT, `bug_type_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`bug_type_id`), UNIQUE KEY `bug_type_text` (`bug_type_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `bug_type` -- INSERT INTO `bug_type` (`bug_type_id`, `bug_type_text`, `ordering`) VALUES (1, 'Bug System', 1), (2, 'Doc', 2); -- -------------------------------------------------------- -- -- Table structure for table `comment_type` -- DROP TABLE IF EXISTS `comment_type`; CREATE TABLE IF NOT EXISTS `comment_type` ( `comment_type_id` int(11) NOT NULL AUTO_INCREMENT, `comment_type_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`comment_type_id`), UNIQUE KEY `comment_type_text` (`comment_type_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `comment_type` -- INSERT INTO `comment_type` (`comment_type_id`, `comment_type_text`, `ordering`) VALUES (1, 'description', 1), (2, 'reproduce', 2), (3, 'expected', 3), (4, 'actual', 4); -- -------------------------------------------------------- -- -- Table structure for table `configuration` -- DROP TABLE IF EXISTS `configuration`; CREATE TABLE IF NOT EXISTS `configuration` ( `conf_id` int(11) NOT NULL AUTO_INCREMENT, `conf_name` varchar(255) NOT NULL, `conf_data` varchar(255) NOT NULL, `update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`conf_id`), UNIQUE KEY `conf_name` (`conf_name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -- Dumping data for table `configuration` -- INSERT INTO `configuration` (`conf_id`, `conf_name`, `conf_data`, `update`) VALUES (1, 'mode', '0', '2008-06-04 12:36:33'); -- -------------------------------------------------------- -- -- Table structure for table `os_version` -- DROP TABLE IF EXISTS `os_version`; CREATE TABLE IF NOT EXISTS `os_version` ( `os_version_id` int(11) NOT NULL AUTO_INCREMENT, `os_version_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`os_version_id`), UNIQUE KEY `os_version_text` (`os_version_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `os_version` -- INSERT INTO `os_version` (`os_version_id`, `os_version_text`, `ordering`) VALUES (1, 'Linux', 1), (2, 'W1nd0w5', 2); -- -------------------------------------------------------- -- -- Table structure for table `php_version` -- DROP TABLE IF EXISTS `php_version`; CREATE TABLE IF NOT EXISTS `php_version` ( `php_version_id` int(11) NOT NULL AUTO_INCREMENT, `php_version_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`php_version_id`), UNIQUE KEY `php_version_text` (`php_version_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; -- -- Dumping data for table `php_version` -- INSERT INTO `php_version` (`php_version_id`, `php_version_text`, `ordering`) VALUES (1, '5.2.6', 1), (2, '4.4.8', 2), (3, '4CVS-2008-06-27 (snap)', 3), (4, '4CVS-2008-06-27 (CVS)', 4), (5, '5.2CVS-2008-06-27 (CVS)', 5), (6, '5.3CVS-2008-06-27 (snap)', 6), (7, '6CVS-2008-06-27 (snap)', 7), (8, '6CVS-2008-06-27 (CVS)', 8); -- -------------------------------------------------------- -- -- Table structure for table `status` -- DROP TABLE IF EXISTS `status`; CREATE TABLE IF NOT EXISTS `status` ( `status_id` int(11) NOT NULL AUTO_INCREMENT, `status_text` varchar(255) NOT NULL, `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`status_id`), UNIQUE KEY `status_text` (`status_text`), UNIQUE KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `status` -- INSERT INTO `status` (`status_id`, `status_text`, `ordering`) VALUES (1, 'Pending', 0), (2, 'Bogus', 1), (3, 'Is Bug', 2), (4, 'Fixed', 3); -- -------------------------------------------------------- -- -- Table structure for table `temp_account` -- DROP TABLE IF EXISTS `temp_account`; CREATE TABLE IF NOT EXISTS `temp_account` ( `handle` varchar(20) NOT NULL, `email` varchar(100) NOT NULL, `password` varchar(32) NOT NULL, `registered` datetime NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`handle`), KEY `email` (`email`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `temp_account` -- -- -------------------------------------------------------- -- -- Table structure for table `user` -- DROP TABLE IF EXISTS `user`; CREATE TABLE IF NOT EXISTS `user` ( `handle` varchar(20) NOT NULL, `account_type` int(11) NOT NULL DEFAULT '1', `password` varchar(32) DEFAULT NULL, `email` varchar(100) NOT NULL, `registered` datetime NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `website` varchar(255) NOT NULL, PRIMARY KEY (`handle`), KEY `email` (`email`,`handle`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- INSERT INTO `user` (`handle`, `account_type`, `password`, `email`, `registered`, `updated`, `website`) VALUES ('barrycarlyon', 2, 'a1b8585122e1ad60623d6a74d3eb3b6a', 'barry@barrycarlyon.co.uk', '2008-07-16 12:51:56', '2008-07-16 12:53:43', 'http://barrycarlyon.co.uk/'); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;