diff --git a/doc/ChangeLog b/doc/ChangeLog index 221b235738..35ffbb3dc6 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -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. diff --git a/view_bug_advanced_page.php b/view_bug_advanced_page.php index afc541e578..5ffe65bf12 100644 --- a/view_bug_advanced_page.php +++ b/view_bug_advanced_page.php @@ -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; + } ?> @@ -142,7 +154,7 @@ - + diff --git a/view_bug_inc.php b/view_bug_inc.php index f6b609b139..754f644954 100644 --- a/view_bug_inc.php +++ b/view_bug_inc.php @@ -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; + } ?>

@@ -122,7 +134,7 @@ - -
+ diff --git a/view_bug_page.php b/view_bug_page.php index 10a05f0483..05fdf28be4 100644 --- a/view_bug_page.php +++ b/view_bug_page.php @@ -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; + } ?> @@ -139,7 +151,7 @@ +