/** * Print column content for column overdue * * @param BugData $p_bug bug object * @param int $p_columns_target see COLUMNS_TARGET_* in constant_inc.php * @return null * @access public */ function print_column_overdue($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE) { global $t_icon_path; echo '<td class="column-overdue">'; if (access_has_bug_level(config_get('due_date_view_threshold'), $p_bug->id) && !date_is_null($p_bug->due_date) && bug_is_overdue($p_bug->id)) { $t_overdue_text = lang_get('overdue'); $t_overdue_text_hover = $t_overdue_text . '. Due date was: ' . string_display_line(date(config_get('short_date_format'), $p_bug->due_date)); echo '<img src="' . $t_icon_path . 'overdue.png" alt="' . $t_overdue_text . '" title="' . $t_overdue_text_hover . '" />'; } else { echo ' '; } echo '</td>'; }
} $tpl_show_reminder_link = !current_user_is_anonymous() && !bug_is_readonly($f_bug_id) && access_has_bug_level(config_get('bug_reminder_threshold'), $f_bug_id); $tpl_bug_reminder_link = 'bug_reminder_page.php?bug_id=' . $f_bug_id; $tpl_print_link = 'print_bug_page.php?bug_id=' . $f_bug_id; $tpl_top_buttons_enabled = !$tpl_force_readonly && ($t_action_button_position == POSITION_TOP || $t_action_button_position == POSITION_BOTH); $tpl_bottom_buttons_enabled = !$tpl_force_readonly && ($t_action_button_position == POSITION_BOTTOM || $t_action_button_position == POSITION_BOTH); $tpl_show_project = in_array('project', $t_fields); $tpl_project_name = $tpl_show_project ? string_display_line(project_get_name($tpl_bug->project_id)) : ''; $tpl_show_id = in_array('id', $t_fields); $tpl_formatted_bug_id = $tpl_show_id ? string_display_line(bug_format_id($f_bug_id)) : ''; $tpl_show_date_submitted = in_array('date_submitted', $t_fields); $tpl_date_submitted = $tpl_show_date_submitted ? date(config_get('normal_date_format'), $tpl_bug->date_submitted) : ''; $tpl_show_last_updated = in_array('last_updated', $t_fields); $tpl_last_updated = $tpl_show_last_updated ? date(config_get('normal_date_format'), $tpl_bug->last_updated) : ''; $tpl_show_tags = in_array('tags', $t_fields) && access_has_global_level(config_get('tag_view_threshold')); $tpl_bug_overdue = bug_is_overdue($f_bug_id); $tpl_show_view_state = in_array('view_state', $t_fields); $tpl_bug_view_state_enum = $tpl_show_view_state ? string_display_line(get_enum_element('view_state', $tpl_bug->view_state)) : ''; $tpl_show_due_date = in_array('due_date', $t_fields) && access_has_bug_level(config_get('due_date_view_threshold'), $f_bug_id); if ($tpl_show_due_date) { if (!date_is_null($tpl_bug->due_date)) { $tpl_bug_due_date = date(config_get('normal_date_format'), $tpl_bug->due_date); } else { $tpl_bug_due_date = ''; } } $tpl_show_reporter = in_array('reporter', $t_fields); $tpl_show_handler = in_array('handler', $t_fields) && access_has_bug_level(config_get('view_handler_threshold'), $f_bug_id); $tpl_show_additional_information = !is_blank($tpl_bug->additional_information) && in_array('additional_info', $t_fields); $tpl_show_steps_to_reproduce = !is_blank($tpl_bug->steps_to_reproduce) && in_array('steps_to_reproduce', $t_fields); $tpl_show_monitor_box = !$tpl_force_readonly;
# Assigned To echo '<th class="category"><label for="handler_id">' . lang_get('assigned_to') . '</label></th>'; echo '<td>'; if (access_has_project_level(config_get('update_bug_assign_threshold', config_get('update_bug_threshold')))) { echo '<select ' . helper_get_tab_index() . ' id="handler_id" name="handler_id">'; echo '<option value="0"></option>'; print_assign_to_option_list($t_bug->handler_id, $t_bug->project_id); echo '</select>'; } else { echo $t_handler_name; } echo '</td>'; if ($t_show_due_date) { # Due Date echo '<th class="category"><label for="due_date">' . lang_get('due_date') . '</label></th>'; if (bug_is_overdue($t_bug_id)) { echo '<td class="overdue">'; } else { echo '<td>'; } if (access_has_bug_level(config_get('due_date_update_threshold'), $t_bug_id)) { $t_date_to_display = ''; if (!date_is_null($t_bug->due_date)) { $t_date_to_display = date(config_get('calendar_date_format'), $t_bug->due_date); } echo "<input " . helper_get_tab_index() . " type=\"text\" id=\"due_date\" name=\"due_date\" class=\"datetime\" size=\"20\" maxlength=\"16\" value=\"" . $t_date_to_display . "\" />"; } else { if (!date_is_null($t_bug->due_date)) { echo date(config_get('short_date_format'), $t_bug->due_date); } }
if ( access_has_project_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ) ) ) { echo '<select ' . helper_get_tab_index() . ' id="handler_id" name="handler_id">'; echo '<option value="0"></option>'; print_assign_to_option_list( $tpl_bug->handler_id, $tpl_bug->project_id ); echo '</select>'; } else { echo $tpl_handler_name; } echo '</td>'; if ( $tpl_show_due_date ) { # Due Date echo '<th class="category"><label for="due_date">' . lang_get( 'due_date' ) . '</label></th>'; if ( bug_is_overdue( $tpl_bug_id ) ) { echo '<td class="overdue">'; } else { echo '<td>'; } if ( access_has_bug_level( config_get( 'due_date_update_threshold' ), $tpl_bug_id ) ) { $t_date_to_display = ''; if ( !date_is_null( $tpl_bug->due_date ) ) { $t_date_to_display = date( config_get( 'calendar_date_format' ), $tpl_bug->due_date ); } echo "<input " . helper_get_tab_index() . " type=\"text\" id=\"due_date\" name=\"due_date\" class=\"datetime\" size=\"20\" maxlength=\"16\" value=\"" . $t_date_to_display . "\" />"; } else { if ( !date_is_null( $tpl_bug->due_date ) ) { echo date( config_get( 'short_date_format' ), $tpl_bug->due_date );