cvs: bugtracker /htdocs/elements/js admin.js /template/generic/bug index.php

From: Date: Thu, 14 Aug 2008 01:06:01 +0000
Subject: cvs: bugtracker /htdocs/elements/js admin.js /template/generic/bug index.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-2413@lists.php.net to get a copy of this message
bcarlyon Thu Aug 14 01:06:01 2008 UTC Modified files: /bugtracker/htdocs/elements/js admin.js /bugtracker/template/generic/bug index.php Log: Updated to allow bug states to be changed by those who the bug is assigned to and those who have the karma http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/elements/js/admin.js?r1=1.1&r2=1.2&diff_format=u Index: bugtracker/htdocs/elements/js/admin.js diff -u bugtracker/htdocs/elements/js/admin.js:1.1 bugtracker/htdocs/elements/js/admin.js:1.2 --- bugtracker/htdocs/elements/js/admin.js:1.1 Wed Aug 13 14:21:03 2008 +++ bugtracker/htdocs/elements/js/admin.js Thu Aug 14 01:06:01 2008 @@ -4,3 +4,8 @@ var assignto = document.getElementById('assign_to').value; window.location = '/admin/assign/' + document.getElementById('bug_id').value + '/' + assignto; } + +function updateStatus() { + var newstate = document.getElementById('newstate').value; + window.location = '/admin/state/' + document.getElementById('bug_id').value + '/' + newstate; +} http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/bug/index.php?r1=1.36&r2=1.37&diff_format=u Index: bugtracker/template/generic/bug/index.php diff -u bugtracker/template/generic/bug/index.php:1.36 bugtracker/template/generic/bug/index.php:1.37 --- bugtracker/template/generic/bug/index.php:1.36 Thu Aug 14 00:48:26 2008 +++ bugtracker/template/generic/bug/index.php Thu Aug 14 01:06:01 2008 @@ -37,7 +37,7 @@ * @author Barry Carlyon <bcarlyon@php.net> * @copyright 2008-2008 Barry Carlyon * @license http://www.opensource.org/licenses/bsd-license.php BSD License -* @version CVS: $Id: index.php,v 1.36 2008/08/14 00:48:26 bcarlyon Exp $ +* @version CVS: $Id: index.php,v 1.37 2008/08/14 01:06:01 bcarlyon Exp $ * @link http://gsoc.barrycarlyon.servegame.org/ */ @@ -142,8 +142,8 @@ <tr> <td><h4>Bug: #{DSP_BUG_ID}</h4></td> <td colspan="3" style="width: 220px;">{DSP_SUMMARY}</td> </tr> <tr> <td><h4>{DSP_STATUS}</h4></td> <td>Opened:</td> <td>{DSP_REPORTED_ON}</td> <td>{DSP_REPORTED_BY}</td> </tr> {DSP_ASSIGNED} -{DSP_SHOW_CLOSED} <tr> <td>&nbsp;</td> <td>Closed:</td> <td>{DSP_CLOSED_ON}</td> <td>{DSP_CLOSED_BY}</td> </tr>{DSP_END_CLOSED} -{DSP_SHOW_UPDATED} <tr> <td>&nbsp;</td> <td>Last Updated:</td> <td colspan="2">{DSP_UPDATED}</td> </tr>{DSP_END_UPDATED} +{DSP_SHOW_CLOSED} <tr> <td>&nbsp;</td> <td>Closed:</td> <td>{DSP_CLOSED_ON}</td> <td>{DSP_CLOSED_BY}</td> </tr>{DSP_END_CLOSED} +{DSP_SHOW_UPDATED} <tr> <td>&nbsp;</td> <td>Last Updated:</td> <td colspan="2">{DSP_UPDATED}</td> </tr>{DSP_END_UPDATED} <tr> <td>&nbsp;</td> <td colspan="2" style="text-align: right;">Version:</td> <td>{DSP_PHP_VERSION}</td> </tr> <tr> <td>&nbsp;</td> <td colspan="2" style="text-align: right;">Type:</td> <td>{DSP_BUG_TYPE}</td> </tr> <tr> <td>&nbsp;</td> <td colspan="2" style="text-align: right;">Os:</td> <td>{DSP_OS_VERSION}</td> </tr> @@ -204,6 +204,13 @@ } $html = $template->swap('dsp_assigned', '', $html); + if ($user->check_karma('bugz_admin') || $bug_row['assigned_to'] == $user->handle) + { + $states = $cache->convert('status', 'select', $bug_row['status']); + $code = '<select name="newstate" id="newstate"><option value="">--State--</option>' . $states . '</select><input type="button" value="Go" onclick="updateStatus()" />'; + $html = $template->swap('dsp_status', $code, $html); + } + $content .= $template->loop(array($bug_row), $html); $comment_html = '<tr><td></td><td colspan="3" class="comment">{DSP_HANDLE} commented<br />&nbsp;&nbsp;&nbsp;{DSP_COMMENT}<br /><div style="text-align: right; float: right;">@ {DSP_UPDATED}</div></td></tr>';

« previous php.webmaster (#2413) next »