r325: - All custom field data in showreport.php is now handled by construct_custom_fi...
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 25 Jul 2005 01:03:27 +0000 (01:03 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 25 Jul 2005 01:03:27 +0000 (01:03 +0000)
- Moved bug information into tabular form
- Finished most of the showreport.php styling

includes/functions.php
showreport.php
templates/bugfield_input_checkbox.tpl
templates/bugfield_input_text.tpl
templates/bugfield_select_single.tpl
templates/bugfield_static_text.tpl [new file with mode: 0644]
templates/customfield_bit.tpl [new file with mode: 0644]
templates/pcv_select_row.tpl
templates/showreport.tpl
templates/style.css

index 15cbbfafe5bed5aa410d400e2e2e1f86c3d3aae7..7b05fc5ecad43f7dd114e581f2895044efab3377 100755 (executable)
@@ -68,7 +68,7 @@ function can_perform($bitmask, $userinfo = null)
 // #################### Start construct_pcv_select ###################
 // constructs a product/component/version select with one go :-)
 // NB: need to make sure we have the option to turn off just p/c selection without v
-function construct_pcv_select($select = '', $prefix = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;')
+function construct_pcv_select($select = '', $prefix = '--')
 {
        global $bugsys;
        static $HTML;
@@ -79,7 +79,7 @@ function construct_pcv_select($select = '', $prefix = '&nbsp;&nbsp;&nbsp;&nbsp;&
        }
        
        
-       $selected = ' checked="checked"';
+       $selected = ' selected="selected"';
        
        $products_fetch = $bugsys->db->query("SELECT * FROM " . TABLE_PREFIX . "product ORDER BY displayorder ASC");
        while ($product = $bugsys->db->fetch_array($products_fetch))
@@ -105,18 +105,21 @@ function construct_pcv_select($select = '', $prefix = '&nbsp;&nbsp;&nbsp;&nbsp;&
                $row['prefix'] = '';
                $valuepfx = "p$product[productid]";
                $row['value'] = "{$valuepfx}c0v0";
-               $row['title'] = "<strong style=\"text-decoration: underline\">$product[title]</strong>";
+               $row['title'] = $product['title'];
+               $row['optgroup'] = true;
                $row['description'] = $product['description'];
                $show['input'] = false;
+               $begin = true;
                eval('$HTML .= "' . $bugsys->template->fetch('pcv_select_row') . '";');
                $HTML .= construct_pcv_select_global_version($product['productid'], 0, $versions, $prefix, $select);
                if (is_array($versions["$product[productid]"]))
                {
                        foreach ($versions["$product[productid]"] AS $version)
                        {
-                               $row['prefix'] = $prefix . $prefix;
+                               $row['prefix'] = $prefix . $prefix . ' ';
                                $row['value'] = "{$valuepfx}c0v$version[versionid]";
                                $row['title'] = $version['version'];
+                               $row['optgroup'] = false;
                                $row['selected'] = (($select == $row['value']) ? $selected : '');
                                $row['description'] = '';
                                $show['input'] = true;
@@ -128,11 +131,14 @@ function construct_pcv_select($select = '', $prefix = '&nbsp;&nbsp;&nbsp;&nbsp;&
                {
                        foreach ($components["$product[productid]"] AS $component)
                        {
-                               $row['prefix'] = $prefix;
+                               $row['prefix'] = $prefix . ' ';
                                $valuepfx .= "c$component[productid]";
                                $row['value'] = "{$valuepfx}v0";
                                $row['selected'] = (($select == $row['value']) ? $selected : '');
-                               $row['title'] = "<span style=\"text-decoration: underline\">$component[title]</span>";
+                               $row['title'] = $component['title'];
+                               $row['depth'] = 1;
+                               $row['optgroup'] = true;
+                               $begin = true;
                                $row['description'] = $component['description'];
                                $show['input'] = false;
                                eval('$HTML .= "' . $bugsys->template->fetch('pcv_select_row') . '";');
@@ -142,16 +148,23 @@ function construct_pcv_select($select = '', $prefix = '&nbsp;&nbsp;&nbsp;&nbsp;&
                                        foreach ($versions["$component[productid]"] AS $version)
                                        {
                                                $show['input'] = true;
-                                               $row['prefix'] = $prefix . $prefix;
+                                               $row['prefix'] = $prefix . $prefix . ' ';
                                                $row['value'] = "{$valuepfx}v$version[versionid]";
                                                $row['selected'] = (($select == $row['value']) ? $selected : '');
                                                $row['title'] = $version['version'];
+                                               $row['optgroup'] = false;
                                                $row['description'] = '';
                                                eval('$HTML .= "' . $bugsys->template->fetch('pcv_select_row') . '";');
                                        }
                                }
                        }
+                       $row['optgroup'] = true;
+                       $begin = false;
+                       eval('$HTML .= "' . $bugsys->template->fetch('pcv_select_row') . '";');
                }
+               $row['optgroup'] = true;
+               $begin = false;
+               eval('$HTML .= "' . $bugsys->template->fetch('pcv_select_row') . '";');
        }
        
        return $HTML;
@@ -165,11 +178,12 @@ function construct_pcv_select_global_version($product = 0, $component = 0, $vers
        {
                foreach ($versions['0'] AS $version)
                {
-                       $row['prefix'] = $prefix . $prefix;
+                       $row['prefix'] = $prefix . $prefix. ' ';
                        $row['typeselect'] = $type;
                        $row['value'] = "p{$product}c{$component}v$version[versionid]";
-                       $row['selected'] = (($select == $row['value']) ? ' checked="checked"' : '');
+                       $row['selected'] = (($select == $row['value']) ? ' selected="selected"' : '');
                        $row['title'] = $version['version'];
+                       $row['optgroup'] = false;
                        $row['description'] = '';
                        $show['input'] = true;
                        eval('$global_versions_html .= "' . $bugsys->template->fetch('pcv_select_row') . '";');
@@ -316,11 +330,11 @@ function construct_custom_fields($bug = array())
        {
                $fields = array();
                $fields_fetch = $bugsys->db->query("
-                       SELECT bugfield.*
+                       SELECT bugfield.*, permission.mask
                        FROM " . TABLE_PREFIX . "bugfield AS bugfield
                        LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
                                ON (bugfield.fieldid = permission.fieldid)
-                       WHERE permission.mask = 2
+                       WHERE (permission.mask = 2 OR permission.mask = 1)
                        AND permission.usergroupid = {$bugsys->userinfo['usergroupid']}"
                );
                while ($field = $bugsys->db->fetch_array($fields_fetch))
@@ -329,12 +343,15 @@ function construct_custom_fields($bug = array())
                }
        }
        
+       $fieldvalues = $bugsys->db->query_first("SELECT * FROM " . TABLE_PREFIX . "bugvaluefill WHERE bugid = $bug[bugid]");
+       
        $fieldbits = '';
        
        foreach ($fields AS $field)
        {
                if (!is_null($bug["field$field[fieldid]"]))
                {
+                       $bugsys->debug("not null: $field[fieldid]");
                        $value = $bug["field$field[fieldid]"];
                }
                else
@@ -342,53 +359,91 @@ function construct_custom_fields($bug = array())
                        $value = $field['defaultvalue'];
                }
                
-               switch ($field['type'])
+               if ($field['mask'] == 2)
                {
-                       case 'input_text':
-                               eval('$tempfield = "' . $bugsys->template->fetch('bugfield_input_text') . '";');
-                       break;
-                       
-                       case 'input_checkbox':
-                               $selected = (($value) ? ' checked="checked"' : '');
-                               eval('$tempfield = "' . $bugsys->template->fetch('bugfield_input_checkbox') . '";');
-                       break;
-                       
-                       case 'select_single':
-                               $selects = unserialize($field['selects']);
-                               $value = trim($value);
+                       switch ($field['type'])
+                       {
+                               case 'input_text':
+                                       eval('$tempfield = "' . $bugsys->template->fetch('bugfield_input_text') . '";');
+                               break;
                                
-                               $options = '';
+                               case 'input_checkbox':
+                                       $selected = (($value) ? ' checked="checked"' : '');
+                                       eval('$tempfield = "' . $bugsys->template->fetch('bugfield_input_checkbox') . '";');
+                               break;
                                
-                               $id = -1;
-                               $select = '';
-                               if (!$field['usedefault'] AND !trim($value))
-                               {
-                                       $selected = ' selected="selected"';
-                               }
-                               else
-                               {
-                                       $selected = '';
-                               }
-                               eval('$options .= "' . $bugsys->template->fetch('bugfield_select_single_option') . '";');
-                               
-                               foreach ($selects AS $id => $select)
-                               {
-                                       $selected = '';
-                                       $select = stripslashes(trim($select));
-                                       if ($select == $value)
+                               case 'select_single':
+                                       $selects = unserialize($field['selects']);
+                                       $value = trim($value);
+                                       
+                                       $options = '';
+                                       
+                                       $id = -1;
+                                       $select = '';
+                                       if (!$field['usedefault'] AND !trim($value))
                                        {
                                                $selected = ' selected="selected"';
                                        }
-                                       else if ($field['usedefault'] AND $id == 0)
+                                       else
                                        {
-                                               $selected = ' selected="selected"';
+                                               $selected = '';
                                        }
                                        eval('$options .= "' . $bugsys->template->fetch('bugfield_select_single_option') . '";');
+                                       
+                                       foreach ($selects AS $id => $select)
+                                       {
+                                               $selected = '';
+                                               $select = stripslashes(trim($select));
+                                               if ($select == $value)
+                                               {
+                                                       $selected = ' selected="selected"';
+                                               }
+                                               else if ($field['usedefault'] AND $id == 0)
+                                               {
+                                                       $selected = ' selected="selected"';
+                                               }
+                                               eval('$options .= "' . $bugsys->template->fetch('bugfield_select_single_option') . '";');
+                                       }
+                                       eval('$tempfield = "' . $bugsys->template->fetch('bugfield_select_single') . '";');
+                               break;
+                       }
+               }
+               else
+               {
+                       $bugsys->debug('mask 1 processing');
+                       if (is_null($fieldvalues["field$field[fieldid]"]))
+                       {
+                               $bugsys->debug("is null: $field[fieldid]");
+                               if ($field['type'] == 'select_single')
+                               {
+                                       if ($field['usedefault'])
+                                       {
+                                               $temp = unserialize($field['selects']);
+                                               $value = trim($temp[0]);
+                                       }
+                                       else
+                                       {
+                                               $value = $fieldvalues["field$field[fieldid]"];
+                                       }
                                }
-                               eval('$tempfield = "' . $bugsys->template->fetch('bugfield_select_single') . '";');
-                       break;
+                               else
+                               {
+                                       $value = $field['defaultvalue'];
+                               }
+                       }
+                       else
+                       {
+                               $value = $fieldvalues["field$field[fieldid]"];
+                       }
+                                       
+                       if ($field['type'] == 'input_checkbox')
+                       {
+                               $value = (($value) ? 'True' : 'False');
+                       }
+                       $field['value'] = $value;
+                       eval('$tempfield = "' . $bugsys->template->fetch('bugfield_static_text') . '";');
                }
-               $fieldbits .= $tempfield;
+               $fieldbits[] = $tempfield;
        }
        
        return $fieldbits;
index 5fb7f4eaa650550586926049f5fab8465aa437b7..c4929e95a6aec8c3ff25eb56ab977db5a4954c62 100644 (file)
@@ -11,7 +11,7 @@
 \*=====================================================================*/
 
 $fetchtemplates = array(
-       'SHOWREPORT',
+       'showreport',
        'showreport_attachment',
        'showreport_comment',
        'quicksearch',
@@ -84,6 +84,8 @@ if ($bug['hidden'] AND !can_perform('canviewhidden'))
 $favourite = (bool)$db->query_first("SELECT * FROM " . TABLE_PREFIX . "favourite WHERE bugid = $bug[bugid] AND userid = " . $bugsys->userinfo['userid']);
 $favouritetext = (($favourite) ? 'Remove from Favourites' : 'Add to Favourites');
 
+$bug['userinfo'] = construct_user_display($bug);
+$bug['datetime'] = $datef->format($bugsys->options['dateformat'], $bug['dateline']);
 
 // ###################################################################
 // edit display
@@ -114,9 +116,7 @@ if ($show['edit'])
        $pcv_select = construct_pcv_select("p$bug[productid]c$bug[componentid]v$bug[versionid]");
        
        $firstcomment = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "comment WHERE bugid = $bug[bugid] ORDER BY dateline ASC LIMIT 1");
-       
-       $customfields = construct_custom_fields($bug);
-       
+               
        if ($bug['duplicateof'])
        {
                $duplicate = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = $bug[duplicateof]");
@@ -140,7 +140,7 @@ if ($show['edit'])
                $label = $action['name'];
                $value = $action['actionid'];
                $selected = false;
-               eval('$select[autoaction] .= "' . $bugsys->template->fetch('selectoption') . '";');
+               eval('$select[autoaction] .= "' . $template->fetch('selectoption') . '";');
                $show['autoactions'] = true;
        }
        if ($show['autoactions'])
@@ -148,7 +148,7 @@ if ($show['edit'])
                $label = '';
                $value = 0;
                $selected = true;
-               eval('$select[autoaction] = "' . $bugsys->template->fetch('selectoption') . '" . $select[autoaction];');
+               eval('$select[autoaction] = "' . $template->fetch('selectoption') . '" . $select[autoaction];');
        }
 }
 
@@ -158,7 +158,6 @@ else
 {
        // -------------------------------------------------------------------
        // prep display
-       $bug['userinfo'] = construct_user_display($bug);
        $bug['product'] = $bugsys->datastore['product']["$bug[productid]"]['title'];
        $bug['component'] = (($bug['componentid']) ? $bugsys->datastore['product']["$bug[componentid]"]['title'] : '');
        $bug['version'] = $bugsys->datastore['version']["$bug[versionid]"]['version'];
@@ -188,64 +187,36 @@ else
                }
                $dependencies = implode(' ', $depends);
        }
-               
-       // -------------------------------------------------------------------
-       // custom fields
-       $customfields = '';
-       
-       $allfields = $db->query("
-               SELECT bugfield.*
-               FROM " . TABLE_PREFIX . "bugfield AS bugfield
-               LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
-                       ON (bugfield.fieldid = permission.fieldid)
-               WHERE permission.mask <> 0
-               AND permission.usergroupid = {$bugsys->userinfo['usergroupid']}"
-       );
-       while ($field = $db->fetch_array($allfields))
+}
+
+// ###################################################################
+// custom field output
+
+$fields = construct_custom_fields($bug);
+
+$bugsys->debug(count($fields) % 2);
+$i = 1;
+foreach ($fields AS $field)
+{
+       $bugsys->debug("i = $i");
+       if ($i == 1)
        {
-               $fieldlist["$field[fieldid]"] = $field;
+               $left = $field;
        }
-       
-       $fieldvalues = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bugvaluefill WHERE bugid = $bug[bugid]");
-       
-       foreach ($fieldlist AS $fieldid => $field)
+       else if ($i == 2)
        {
-               if (is_null($fieldvalues["field$fieldid"]))
-               {
-                       if ($field['type'] == 'select_single')
-                       {
-                               if ($field['usedefault'])
-                               {
-                                       $temp = unserialize($field['selects']);
-                                       $value = trim($temp[0]);
-                               }
-                               else
-                               {
-                                       continue;
-                               }
-                       }
-                       else
-                       {
-                               $value = $field['defaultvalue'];
-                       }
-               }
-               else
-               {
-                       $value = $fieldvalues["field$fieldid"];
-               }
-               
-               $customfields .= "<div><strong>$field[name]:</strong> ";
-               
-               if ($field['type'] == 'input_text' OR $field['type'] == 'select_single')
-               {
-                       $customfields .= $value;
-               }
-               else if ($field['type'] == 'input_checkbox')
-               {
-                       $customfields .= (($value) ? 'True' : 'False');
-               }
-               $customfields .= "</div>\n\n";
+               $right = $field;
+               eval('$customfields .= "' . $template->fetch('customfield_bit') . '";');
+               $i = 0;
        }
+       $i++;
+}
+
+if ((count($fields) % 2) != 0)
+{
+       $bugsys->debug('no modulo for you');
+       $right = '';
+       eval('$customfields .= "' . $template->fetch('customfield_bit') . '";');
 }
 
 // ###################################################################
@@ -341,7 +312,7 @@ if (is_array($hilight))
        }
 }
 
-eval('$template->flush("' . $template->fetch('SHOWREPORT') . '");');
+eval('$template->flush("' . $template->fetch('showreport') . '");');
 
 /*=====================================================================*\
 || ###################################################################
index 5db95cd687dae8ab31fca98d89b3735e5c302d07..856f4d635aad3d8b96b9ac5e72817d77a57f0b21 100644 (file)
@@ -1 +1,4 @@
-<div><strong>$field[name]:</strong> <input name="<if condition="$show['search']">custom[$field[fieldid]]<else />field$field[fieldid]</if>" type="checkbox" value="1"$selected /></div>
\ No newline at end of file
+       <!-- custom field$field[fieldid] -->
+       <td class="tlabel">$field[name]</td>
+       <td class="tdata"><input name="<if condition="$show['search']">custom[$field[fieldid]]<else />field$field[fieldid]</if>" type="checkbox" value="1"$selected /></td>
+       <!-- / custom field$field[fieldid] -->
\ No newline at end of file
index e0e140a863c8241b653649ae052f214d9a00d478..ea4e601d9628c841fc0e66e551d5d28d7d8bd445 100644 (file)
@@ -1 +1,4 @@
-<div><strong>$field[name]:</strong> <input name="<if condition="$show['search']">custom[$field[fieldid]]<else />field$field[fieldid]</if>" type="text" value="$value" size="35"<if condition="$field['maxlength']">maxlength="$field[maxlength]</if> /></div>
\ No newline at end of file
+       <!-- custom field$field[fieldid] -->
+       <td class="tlabel">$field[name]</td>
+       <td class="tdata"><input name="<if condition="$show['search']">custom[$field[fieldid]]<else />field$field[fieldid]</if>" type="text" value="$value" size="35"<if condition="$field['maxlength']">maxlength="$field[maxlength]</if> /></td>
+       <!-- / custom field$field[fieldid] -->
index 9ed7dafeaa4ea5fd7aa64adbf49b65fd4cb024b6..4b39074517d9c151ce920758562ee6fecc3b3a18 100644 (file)
@@ -1 +1,4 @@
-<div><strong>$field[name]:</strong> <select name="<if condition="$show['search']">custom[$field[fieldid]]<else />field$field[fieldid]</if>">$options</select></div>
\ No newline at end of file
+       <!-- custom field$field[fieldid] -->
+       <td class="tlabel">$field[name]</td>
+       <td class="tdata"><select name="<if condition="$show['search']">custom[$field[fieldid]]<else />field$field[fieldid]</if>">$options</select></td>
+       <!-- / custom field$field[fieldid] -->
\ No newline at end of file
diff --git a/templates/bugfield_static_text.tpl b/templates/bugfield_static_text.tpl
new file mode 100644 (file)
index 0000000..47aac79
--- /dev/null
@@ -0,0 +1,4 @@
+       <!-- custom field$field[fieldid] -->
+       <td class="tlabel">$field[name]</td>
+       <td class="tdata">$field[value]</td>
+       <!-- / custom field$field[fieldid] -->
diff --git a/templates/customfield_bit.tpl b/templates/customfield_bit.tpl
new file mode 100644 (file)
index 0000000..9034c8b
--- /dev/null
@@ -0,0 +1,7 @@
+<tr>
+$left
+       
+<if condition="$right">$right<else />  <!-- EMPTY CUSTOM FIELD -->
+       <td class="tlabel" colspan="2">&nbsp;</td>
+       <!-- / EMPTY CUSTOM FIELD --></if>
+</tr>
index b017afb0d45cd0e5bd55c02ba0a0229a43a2cf54..2748a7764b0925e0d4a7c5dddbd254c5426ee4a4 100755 (executable)
@@ -1 +1 @@
-$row[prefix] <if condition="$show['input']"><input name="pcv_select" type="radio" value="$row[value]"$row[selected] /> </if>$row[title]<if condition="$row['description']">: <em>$row[description]</em></if><br />
+<if condition="$row['optgroup']"><if condition="$begin"><optgroup label="$row[prefix]$row[title]"><else /></optgroup></if><else /><option value="$row[value]"$row[selected]></if>$row[prefix]$row[title]</option>
\ No newline at end of file
index d3c8c2e426dd74500cdd6e4f2a8fbb4a8669c63d..e9903fadd8f77e936babe7bd2061d370c70921ff 100644 (file)
@@ -2,78 +2,179 @@ $doctype
 $headinclude
 $header
 
-<if condition="$show['edit']">
-       <form name="bugreport" action="editreport.php" method="post">
-       <input type="hidden" name="do" value="update" />
-       <input type="hidden" name="bugid" value="$bug[bugid]" />
-</if>
-
-<if condition="$show['edit']">
-       <div><strong<if condition="$bug['hidden']"> style="color: red"</if>>Hidden:</strong> <input type="checkbox" name="hidden" value="1"<if condition="$bug['hidden']"> checked="checked"</if> /></div>
-<else />
-       <if condition="$bug['hidden']"><div><strong style="color: red">This bug is hidden!</strong></div></if>
-</if>
-
-<div><strong>Bug ID:</strong> $bug[bugid]</div>
-<div><strong>Reported by:</strong> $bug[userinfo]</div>
-
-<if condition="$show['edit']">
-       <div><strong>Summary/Title:</strong> <input type="text" name="summary" size="25" value="$bug[summary]" /></div>
-       <div><strong>Severity:</strong> <select name="severity">$select[severity]</select></div>
+<form name="bugreport" action="editreport.php" method="post">
+<input type="hidden" name="do" value="update" />
+<input type="hidden" name="bugid" value="$bug[bugid]" />
+
+<table width="100%" cellspasing="$stylevar[spacing_border]" cellpadding="$stylevar[padding]" border="$stylevar[border]" class="tborder">
+<tr>
+       <!-- bug id & hidden -->
+       <td class="tlabel">Bug ID</td>
+       <td class="tdata">
+               $bug[bugid]
        
-       <if condition="$show['changestatus']">
-               <div><strong>Priority:</strong> <select name="priority">$select[priority]</select></div>
-               <div><strong>Status:</strong> <select name="status">$select[status]</select></div>
-               <div><strong>Resolution:</strong> <select name="resolution">$select[resolution]</select></div>
-       </if>
+               <if condition="$show['edit']">
+                       /
+                       <strong<if condition="$bug['hidden']"> class="error"</if>>Hidden:</strong>
+                       <input type="checkbox" name="hidden" value="1"<if condition="$bug['hidden']"> checked="checked"</if> />
+               <else />
+                       <if condition="$bug['hidden']"> / <span class="error">Hidden Bug</span></if>
+               </if>
+       </td>
+       <!-- / bug id & hidden -->
        
-       <if condition="$show['assign']">
-               <div><strong>Assigned to:</strong> <select name="assignedto"><option value="0"<if condition="!$bug['assignedto']"> selected="selected"</if>>No Assignment</option>$select[dev]</select></div>
-       </if>
-
-       <div><strong>Duplicate of:</strong> <input type="text" name="duplicateof" size="10" value="<if condition="$bug['duplicateof']">$bug[duplicateof]</if>" /> <if condition="$bug['duplicateof']"><a href="showreport.php?bugid=$bug[duplicateof]" target="_blank">$duplicate[summary]</a></if></div>
-
-       <div><strong>Dependencies:</strong> <input type="text" name="dependency" size="25" value="$bug[dependency]" /> $dependencies</div>
+       <!-- summary -->
+       <td class="tlabel">Summary</td>
+       <td class="tdata">
+               <if condition="$show['edit']">
+                       <input type="text" name="summary" size="25" value="$bug[summary]" style="width: 100%" />
+               <else />
+                       $bug[summary]
+               </if>
+       </td>
+       <!-- / summary -->
+</tr>
+<tr>
+       <!-- reporter -->
+       <td class="tlabel">Reporter</td>
+       <td class="tdata">$bug[userinfo]</td>
+       <!-- / reporter -->
        
-       <div><strong>Product/Component/Version:</strong>
-               <div>$pcv_select</div>
-       </div>
+       <!-- product -->
+       <td class="tlabel">Product/Version</td>
+       <td class="tdata">
+               <if condition="$show['edit']">
+                       <select name="pcv_select">$pcv_select</select>
+               <else />
+                       $bug[product] <if condition="$bug['componentid']">/ $bug[component]</if> / $bug[version]
+               </if>
+       </td>
+       <!-- / product -->
+</tr>
+<tr>
+       <!-- reporting time -->
+       <td class="tlabel">Report Time</td>
+       <td class="tdata">$bug[datetime]</td>
+       <!-- / reporting time -->
        
-       <div><strong>Automatic Response Action:</strong>
-               <div><select name="autoaction">$select[autoaction]</select></div>
-       </div>
+       <!-- assignment -->
+       <td class="tlabel">Assignment</td>
+       <td class="tdata">
+               <if condition="$show['assign']">
+                       <select name="assignedto"><option value="0"<if condition="!$bug['assignedto']"> selected="selected"</if>>No Assignment</option>$select[dev]</select>
+               <else />
+                       $bug[assigninfo]
+               </if>
+       </td>
+       <!-- / assignment -->
+</tr>
+<tr>
+       <!-- status -->
+       <td class="tlabel">Status</td>
+       <td class="tdata">
+               <if condition="$show['changestatus']">
+                       <select name="status">$select[status]</select>
+               <else />
+                       $bug[status]
+               </if>
+       </td>
+       <!-- / status -->
        
-       $customfields
+       <!-- resolution -->
+       <td class="tlabel">Resolution</td>
+       <td class="tdata">
+               <if condition="$show['changestatus']">
+                       <select name="resolution">$select[resolution]</select>
+               <else />
+                       $bug[resolution]
+               </if>
+       </td>
+       <!-- / resolution -->
+</tr>
+<tr>
+       <!-- severity -->
+       <td class="tlabel">Severity</td>
+       <td class="tdata">
+               <if condition="$show['edit']">
+                       <select name="severity">$select[severity]</select>
+               <else />
+                       $bug[severity]
+               </if>
+       </td>
+       <!-- / severity -->
        
-       <if condition="$show['newreply']">
-               <div><strong>Comment:</strong></div>
-               <textarea name="comment" cols="100" rows="35"></textarea>
-       </if>
-<else />
-       <div><strong>Product:</strong> $bug[product] <if condition="$bug['componentid']">/ <strong>Component:</strong> $bug[component]</if> / <strong>Version:</strong> $bug[version]</div>
-       <div><strong>Title / summary:</strong> $bug[summary]</div>
-       <div><strong>Status:</strong> $bug[status] / <strong>Resolution:</strong> $bug[resolution]</div>
-       <div><strong>Severity:</strong> $bug[severity]</div>
-       <div><strong>Priority:</strong> $bug[priority]</div>
-       <if condition="$bug['assigninfo']"><div><strong>Assigned to:</strong> $bug[assigninfo]</div></if>
-       <if condition="$bug['duplicateof']"><div><strong>Duplicate of:</strong> <a href="showreport.php?bugid=$bug[duplicateof]">$duplicateof[summary]</a></div></if>
-       <if condition="$dupelist"><div><strong>Bugs marked as duplicates of this:</strong> $dupelist</div></if>
-       <if condition="$dependencies"><div><strong>Dependencies:</strong> $dependencies</div></if>
-       $customfields
+       <!-- priority -->
+       <td class="tlabel">Priority</td>
+       <td class="tdata">
+               <if condition="$show['changestatus']">
+                       <select name="priority">$select[priority]</select>
+               <else />
+                       $bug[priority]
+               </if>
+       </td>
+       <!-- / priority -->
+</tr>
+<tr>
+       <!-- duplicate -->
+       <td class="tlabel">Duplicate Of</td>
+       <td class="tdata">
+               <if condition="$show['edit']">
+                       <input type="text" name="duplicateof" size="10" value="<if condition="$bug['duplicateof']">$bug[duplicateof]</if>" />
+                       <if condition="$bug['duplicateof']"><a href="showreport.php?bugid=$bug[duplicateof]" title="$duplicate[summary]" target="_blank">$duplicate[bugid]</a></if>
+               <else />
+                       <a href="showreport.php?bugid=$bug[duplicateof]">$duplicateof[summary]</a>
+               </if>
+       </td>
+       <!-- / duplicate -->
        
-       <if condition="$show['newreply']">
-               <form name="newcomment" method="post" action="newcomment.php">
-               <input type="hidden" name="do" value="insert" />
-               <input type="hidden" name="bugid" value="$bug[bugid]" />
-               <div><strong>Comment:</strong></div>
-               <textarea name="comment" cols="100" rows="35"></textarea>
-               <div><input type="submit" name="submit" value="Add Comment" /></div>
-               </form>
-       </if>
+       <!-- dependencies -->
+       <td class="tlabel">Dependencies</td>
+       <td class="tdata">
+               <if condition="$show['edit']">
+                       <input type="text" name="dependency" size="25" value="$bug[dependency]" /> $dependencies
+               <else />
+                       $dependencies
+               </if>
+       </td>
+       <!-- / dependencies -->
+</tr>
+
+<!-- spacer -->
+<tr>
+       <td colspan="4" style="height: 1px"></td>
+</tr>
+<!-- / spacer -->
+
+$customfields
+
+<!-- spacer -->
+<tr>
+       <td colspan="4" style="height: 1px"></td>
+</tr>
+<!-- / spacer -->
+
+<if condition="$show['newreply'] OR $show['edit']">
+<!-- new comment -->
+<tr>
+       <td class="tlabel" colspan="<if condition="$show['newreply']">2" style="vertical-align: top"<else />4"</if>>
+               <if condition="$show['newreply']">New Reply</if>
+               
+               <if condition="$show['edit']"><div<if condition="$show['newreply']"> style="margin-top: 15px"</if>>Automatic Action: <select name="autoaction">$select[autoaction]</select></div></if>
+       </td>
+       <if condition="$show['newreply']"><td class="tdata" colspan="2"><textarea name="comment" cols="50" rows="10" style="width: 100%"></textarea></td></if>
+</tr>
+<!-- / new comment -->
 </if>
 
-<div><input type="submit" name="submit" value="Save Changes" /></div>
-</form>
+<!-- submit row -->
+<tr>
+       <td colspan="4" class="tfoot">
+               <input type="submit" name="submit" value="  Commit Changes " accesskey="s" />
+               <input type="reset" name="reset" value="  Reset Fields  " accesskey="r" />
+       </td>
+</tr>
+<!-- / submit row -->
+</table>
 
 <div>[<a href="showhistory.php?bugid=$bug[bugid]">Show Bug History</a>]<if condition="$bugsys->userinfo['userid']"> [<a href="favourite.php?do=handle&amp;bugid=$bug[bugid]">$favouritetext</a>]</div>
 
index 50e2b1f7137d34e93c37ade376b085a5bc2f680e..60d65b2776e5a84e946b9635886b063c1cb66895 100644 (file)
@@ -100,6 +100,33 @@ body
        font-weight: bold;
 }
 
+.tborder
+{
+       background-color: rgb(71, 71, 71);
+}
+
+.tlabel
+{
+       font-weight: bold;
+       background-color: rgb(51, 51, 51);
+       color: rgb(255, 255, 255);
+       width: 15%;
+       padding-left: 4px;
+}
+
+.tdata
+{
+       width: 35%;
+       background-color: rgb(255, 255, 255);
+}
+
+.tfoot
+{
+       background-color: rgb(122, 122, 122);
+       text-align: center;
+       font-weight: bold;
+}
+
 #copyright
 {
        text-align: center;