/** * Print column content for column category id * * @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_category_id($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE) { global $t_sort, $t_dir; # grab the project name $t_project_name = project_get_field($p_bug->project_id, 'name'); echo '<td class="column-category">'; # type project name if viewing 'all projects' or if issue is in a subproject if (ON == config_get('show_bug_project_links') && helper_get_current_project() != $p_bug->project_id) { echo '<small class="project">['; print_view_bug_sort_link(string_display_line($t_project_name), 'project_id', $t_sort, $t_dir, $p_columns_target); echo ']</small><br />'; } echo string_display_line(category_full_name($p_bug->category_id, false)); echo '</td>'; }
/** * Print the title of a column given its name. * * @param string $p_column Custom_xxx for custom field xxx, or otherwise field name as in bug table. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void */ function custom_function_default_print_column_title($p_column, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE) { global $t_sort, $t_dir; $t_custom_field = column_get_custom_field_name($p_column); if ($t_custom_field !== null) { if (COLUMNS_TARGET_CSV_PAGE != $p_columns_target) { echo '<th class="column-custom-' . $t_custom_field . '">'; } $t_field_id = custom_field_get_id_from_name($t_custom_field); if ($t_field_id === false) { echo '@', $t_custom_field, '@'; } else { $t_def = custom_field_get_definition($t_field_id); $t_custom_field = lang_get_defaulted($t_def['name']); if (COLUMNS_TARGET_CSV_PAGE != $p_columns_target) { print_view_bug_sort_link($t_custom_field, $p_column, $t_sort, $t_dir, $p_columns_target); print_sort_icon($t_dir, $t_sort, $p_column); } else { echo $t_custom_field; } } if (COLUMNS_TARGET_CSV_PAGE != $p_columns_target) { echo '</th>'; } } else { $t_plugin_columns = columns_get_plugin_columns(); $t_function = 'print_column_title_' . $p_column; if (function_exists($t_function)) { $t_function($t_sort, $t_dir, $p_columns_target); } else { if (isset($t_plugin_columns[$p_column])) { $t_column_object = $t_plugin_columns[$p_column]; print_column_title_plugin($p_column, $t_column_object, $t_sort, $t_dir, $p_columns_target); } else { echo '<th>'; print_view_bug_sort_link(column_get_title($p_column), $p_column, $t_sort, $t_dir, $p_columns_target); print_sort_icon($t_dir, $t_sort, $p_column); echo '</th>'; } } } }
function print_column_category($p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE) { global $t_sort, $t_dir; # grab the project name $t_project_name = project_get_field($p_row['project_id'], 'name'); echo '<td class="center">'; # type project name if viewing 'all projects' or if issue is in a subproject if (ON == config_get('show_bug_project_links') && helper_get_current_project() != $p_row['project_id']) { echo '<small>['; print_view_bug_sort_link($t_project_name, 'project_id', $t_sort, $t_dir, $p_columns_target); echo ']</small><br />'; } echo string_display($p_row['category']); echo '</td>'; }
function custom_function_default_print_column_title($p_column, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE) { global $t_sort, $t_dir; if (strpos($p_column, 'custom_') === 0) { $t_custom_field = substr($p_column, 7); if (COLUMNS_TARGET_CSV_PAGE != $p_columns_target) { echo '<td>'; } $t_field_id = custom_field_get_id_from_name($t_custom_field); if ($t_field_id === false) { echo '@', $t_custom_field, '@'; } else { $t_def = custom_field_get_definition($t_field_id); $t_custom_field = lang_get_defaulted($t_def['name']); if (COLUMNS_TARGET_CSV_PAGE != $p_columns_target) { print_view_bug_sort_link($t_custom_field, $p_column, $t_sort, $t_dir, $p_columns_target); print_sort_icon($t_dir, $t_sort, $p_column); } else { echo $t_custom_field; } } if (COLUMNS_TARGET_CSV_PAGE != $p_columns_target) { echo '</td>'; } } else { $t_function = 'print_column_title_' . $p_column; if (function_exists($t_function)) { $t_function($t_sort, $t_dir, $p_columns_target); } else { echo '<td>'; print_view_bug_sort_link(lang_get_defaulted($p_column), $p_column, $t_sort, $t_dir, $p_columns_target); print_sort_icon($t_dir, $t_sort, $p_column); echo '</td>'; } } }