From 5d422d17b219dc4d759778f1b4712fbb6a8e2158 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 11 Jul 2005 03:34:03 +0000 Subject: [PATCH] r317: - added quicksearch to showreport.php - created smallcontent pane - added alternate_width style var --- showreport.php | 28 ++++++++++++++++++++++++++-- templates/style.css | 11 +++++++++++ templates/stylevars.txt | 4 ++++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/showreport.php b/showreport.php index a07b886..26b0759 100644 --- a/showreport.php +++ b/showreport.php @@ -13,7 +13,8 @@ $fetchtemplates = array( 'SHOWREPORT', 'showreport_attachment', - 'showreport_comment' + 'showreport_comment', + 'quicksearch' ); define('SVN', '$Id$'); @@ -27,6 +28,29 @@ if (!can_perform('canviewbugs')) $message->error_permission(); } +$bugid = intval($bugsys->in['bugid']); + +// ################################################################### + +if (empty($bugid) OR $_REQUEST['do'] == 'quicksearch') +{ + if (!empty($bugid)) + { + if ($db->query_first("SELECT bugid FROM " . TABLE_PREFIX . "bug WHERE bugid = $bugid")) + { + header("Location: showreport.php?bugid=$bugid"); + exit; + } + else + { + $error = lang::p('error_invalid_id'); + } + } + + eval('$template->flush("' . $template->fetch('quicksearch') . '");'); + exit; +} + // ################################################################### // ------------------------------------------------------------------- @@ -41,7 +65,7 @@ $bug = $db->query_first(" if (!is_array($bug)) { - $message->error('alert: bad bug'); + $message->error(lang::p('error_invalid_id')); } if ($bug['hidden'] AND !can_perform('canviewhidden')) diff --git a/templates/style.css b/templates/style.css index bbb80e2..50e2b1f 100644 --- a/templates/style.css +++ b/templates/style.css @@ -18,6 +18,11 @@ body background-color: rgb(102, 102, 102); } +.error +{ + color: rgb(255, 0, 0); +} + #header { background-color: rgb(51, 51, 51); @@ -82,6 +87,12 @@ body margin: 0px 20px 5px 20px; } +.smallcontent +{ + margin-top: 35px; + +} + .listinghead { background-color: rgb(51, 51, 51); diff --git a/templates/stylevars.txt b/templates/stylevars.txt index bccbc24..36c1119 100644 --- a/templates/stylevars.txt +++ b/templates/stylevars.txt @@ -31,7 +31,11 @@ Comments are only valid in C++ style (the type of comment this is). border: 0; spacing: 2; padding: 3; + +/* page elements */ + normal-width: 100%; +alternate-width: 25%; /*=====================================================================*\ || ################################################################### -- 2.43.5