Skip to content

Commit

Permalink
Modified view bug pages to show bug status via color.
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@830 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Apr 2, 2002
1 parent 4460989 commit 34a67b5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -22,6 +22,7 @@ Mantis
* Modified print_enum_string_option_list() to work better.
* Modified bug_update_advanced to allow for more fields to be updated.
* Modified email subject links to match standard Mantis email format.
* Modified view bug pages to show bug status via color.
* Added Hungarian translation.
* Added g_bug_link_tag to let users customize how to create bug links.
* Added a "jump to bugnotes" quicklink at the top of the view bug pages.
Expand Down
14 changes: 13 additions & 1 deletion view_bug_advanced_page.php
Expand Up @@ -38,6 +38,18 @@
$v2_description = string_display( $v2_description );
$v2_steps_to_reproduce = string_display( $v2_steps_to_reproduce );
$v2_additional_information = string_display( $v2_additional_information );

# choose color based on status only if not resolved
# The code creates the appropriate variable name
# then references that color variable
# You could replace this with a bunch of if... then... else
# statements
$status_color = $g_primary_color1;
if ( CLOSED != $v_status ) {
$t_color_str = get_enum_element( $g_status_enum_string, $v_status );
$t_color_variable_name = "g_".$t_color_str."_color";
$status_color = $$t_color_variable_name;
}
?>
<?php print_page_top1() ?>
<?php print_page_top2() ?>
Expand Down Expand Up @@ -142,7 +154,7 @@
<td class="category">
<?php echo $s_status ?>
</td>
<td>
<td bgcolor="<?php echo $status_color ?>">
<?php echo get_enum_element( $s_status_enum_string, $v_status ) ?>
</td>
<td class="category">
Expand Down
14 changes: 13 additions & 1 deletion view_bug_inc.php
Expand Up @@ -32,6 +32,18 @@
$v2_description = string_display( $v2_description );
$v2_steps_to_reproduce = string_display( $v2_steps_to_reproduce );
$v2_additional_information = string_display( $v2_additional_information );

# choose color based on status only if not resolved
# The code creates the appropriate variable name
# then references that color variable
# You could replace this with a bunch of if... then... else
# statements
$status_color = $g_primary_color1;
if ( CLOSED != $v_status ) {
$t_color_str = get_enum_element( $g_status_enum_string, $v_status );
$t_color_variable_name = "g_".$t_color_str."_color";
$status_color = $$t_color_variable_name;
}
?>
<p>
<table class="width100" cellspacing="1">
Expand Down Expand Up @@ -122,7 +134,7 @@
<td class="category">
<?php echo $s_status ?>
</td>
<td>
<td bgcolor="<?php echo $status_color ?>">
<?php echo get_enum_element( $s_status_enum_string, $v_status ) ?>
</td>
<td class="category">
Expand Down
14 changes: 13 additions & 1 deletion view_bug_page.php
Expand Up @@ -38,6 +38,18 @@
$v2_description = string_display( $v2_description );
$v2_steps_to_reproduce = string_display( $v2_steps_to_reproduce );
$v2_additional_information = string_display( $v2_additional_information );

# choose color based on status only if not resolved
# The code creates the appropriate variable name
# then references that color variable
# You could replace this with a bunch of if... then... else
# statements
$status_color = $g_primary_color1;
if ( CLOSED != $v_status ) {
$t_color_str = get_enum_element( $g_status_enum_string, $v_status );
$t_color_variable_name = "g_".$t_color_str."_color";
$status_color = $$t_color_variable_name;
}
?>
<?php print_page_top1() ?>
<?php print_page_top2() ?>
Expand Down Expand Up @@ -139,7 +151,7 @@
<td class="category">
<?php echo $s_status ?>
</td>
<td>
<td bgcolor="<?php echo $status_color ?>">
<?php echo get_enum_element( $s_status_enum_string, $v_status ) ?>
</td>
<td class="category">
Expand Down

0 comments on commit 34a67b5

Please sign in to comment.