Hide resolved bugs by default, add link to toggle between hiding resolved bugs and showing all
bugs.
This commit is contained in:
@@ -335,6 +335,9 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
|
||||
{
|
||||
$oBuglink = new Bug($iBuglinkId);
|
||||
|
||||
if ( (!isset($aClean['sAllBugs']) && $oBuglink->sBug_status != 'RESOLVED')
|
||||
|| isset($aClean['sAllBugs']) )
|
||||
{
|
||||
// set row color
|
||||
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
|
||||
|
||||
@@ -364,15 +367,33 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
|
||||
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
|
||||
if($_SESSION['current']->isLoggedIn())
|
||||
{
|
||||
echo '<input type="hidden" name="iVersionId" value="'.$iVersionId.'">',"\n";
|
||||
echo '<tr class=color3><td align=center>',"\n";
|
||||
echo '<input type="text" name="iBuglinkId" value="'.$aClean['buglinkId'].'" size="8"></td>',"\n";
|
||||
$sBuglinkId = isset($aClean['buglinkId']) ? $aClean['buglinkId'] : '';
|
||||
echo '<input type="text" name="iBuglinkId" value="'.$sBuglinkId.'" size="8"></td>',"\n";
|
||||
echo '<td><input type="submit" name="sSub" value="Submit a new bug link."></td>',"\n";
|
||||
echo '<td colspan=6></td></tr></form>',"\n";
|
||||
}
|
||||
echo '</table>',"\n";
|
||||
|
||||
// show only open link
|
||||
if ( isset( $aClean['sAllBugs'] ) )
|
||||
{
|
||||
$sURL = str_replace( '&sAllBugs', '', $_SERVER['REQUEST_URI'] );
|
||||
$sLink = '<a href="' . $sURL . '">Show Open Bugs</a>';
|
||||
}
|
||||
// show all link
|
||||
else
|
||||
{
|
||||
$sURL = $_SERVER['REQUEST_URI'] . '&sAllBugs';
|
||||
$sLink = '<a href="' . $sURL . '">Show All Bugs</a>';
|
||||
}
|
||||
|
||||
echo '<div style="text-align:right;">' . $sLink .'</div>';
|
||||
echo html_frame_end();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user