r317: - added quicksearch to showreport.php
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 11 Jul 2005 03:34:03 +0000 (03:34 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 11 Jul 2005 03:34:03 +0000 (03:34 +0000)
- created smallcontent pane
- added alternate_width style var

showreport.php
templates/style.css
templates/stylevars.txt

index a07b88607f04a24055841ed5ef3f867de3be4087..26b075947a1be979c16efd2bee840d5cba0c4192 100644 (file)
@@ -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'))
index bbb80e22cc224141ba4b9673877687b03ea05f09..50e2b1f7137d34e93c37ade376b085a5bc2f680e 100644 (file)
@@ -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);
index bccbc24aa0f903717d6f9a103815ebbd2715f624..36c1119959ec1329c75fa10c216adc3bc3cb0e92 100644 (file)
@@ -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%;
 
 /*=====================================================================*\
 || ###################################################################