| [ Index ] |
|
Code source de Mantis 1.1.0rc3 |
1 <?php 2 # Mantis - a php based bugtracking system 3 4 # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 5 # Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net 6 7 # Mantis is free software: you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation, either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # Mantis is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with Mantis. If not, see <http://www.gnu.org/licenses/>. 19 20 # -------------------------------------------------------- 21 # $Id: columns_api.php,v 1.21.2.1 2007-10-13 22:35:18 giallu Exp $ 22 # -------------------------------------------------------- 23 24 # -------------------- 25 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 26 function print_column_title_selection( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 27 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 28 echo '<td> </td>'; 29 } 30 } 31 32 # -------------------- 33 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 34 function print_column_title_edit( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 35 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 36 echo '<td> </td>'; 37 } 38 } 39 40 # -------------------- 41 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 42 function print_column_title_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 43 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 44 echo '<td>'; 45 print_view_bug_sort_link( lang_get( 'id' ), 'id', $p_sort, $p_dir, $p_columns_target ); 46 print_sort_icon( $p_dir, $p_sort, 'id' ); 47 echo '</td>'; 48 } else { 49 echo lang_get( 'id' ); 50 } 51 } 52 53 # -------------------- 54 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 55 function print_column_title_project_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 56 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 57 echo '<td>'; 58 print_view_bug_sort_link( lang_get( 'email_project' ), 'project_id', $p_sort, $p_dir, $p_columns_target ); 59 print_sort_icon( $p_dir, $p_sort, 'project_id' ); 60 echo '</td>'; 61 } else { 62 echo lang_get( 'email_project' ); 63 } 64 } 65 66 # -------------------- 67 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 68 function print_column_title_duplicate_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 69 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 70 echo '<td>'; 71 print_view_bug_sort_link( lang_get( 'duplicate_id' ), 'duplicate_id', $p_sort, $p_dir, $p_columns_target ); 72 print_sort_icon( $p_dir, $p_sort, 'duplicate_id' ); 73 echo '</td>'; 74 } else { 75 echo lang_get( 'duplicate_id' ); 76 } 77 } 78 79 # -------------------- 80 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 81 function print_column_title_reporter_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 82 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 83 echo '<td>'; 84 print_view_bug_sort_link( lang_get( 'reporter' ), 'reporter_id', $p_sort, $p_dir, $p_columns_target ); 85 print_sort_icon( $p_dir, $p_sort, 'reporter_id' ); 86 echo '</td>'; 87 } else { 88 echo lang_get( 'reporter' ); 89 } 90 } 91 92 # -------------------- 93 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 94 function print_column_title_handler_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 95 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 96 echo '<td>'; 97 print_view_bug_sort_link( lang_get( 'assigned_to' ), 'handler_id', $p_sort, $p_dir, $p_columns_target ); 98 print_sort_icon( $p_dir, $p_sort, 'handler_id' ); 99 echo '</td>'; 100 } else { 101 echo lang_get( 'assigned_to' ); 102 } 103 } 104 105 # -------------------- 106 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 107 function print_column_title_priority( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 108 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 109 echo '<td>'; 110 print_view_bug_sort_link( lang_get( 'priority_abbreviation' ), 'priority', $p_sort, $p_dir, $p_columns_target ); 111 print_sort_icon( $p_dir, $p_sort, 'priority' ); 112 echo '</td>'; 113 } else { 114 echo lang_get( 'priority' ); 115 } 116 } 117 118 # -------------------- 119 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 120 function print_column_title_reproducibility( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 121 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 122 echo '<td>'; 123 print_view_bug_sort_link( lang_get( 'reproducibility' ), 'reproducibility', $p_sort, $p_dir, $p_columns_target ); 124 print_sort_icon( $p_dir, $p_sort, 'reproducibility' ); 125 echo '</td>'; 126 } else { 127 echo lang_get( 'reproducibility' ); 128 } 129 } 130 131 # -------------------- 132 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 133 function print_column_title_projection( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 134 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 135 echo '<td>'; 136 print_view_bug_sort_link( lang_get( 'projection' ), 'projection', $p_sort, $p_dir, $p_columns_target ); 137 print_sort_icon( $p_dir, $p_sort, 'projection' ); 138 echo '</td>'; 139 } else { 140 echo lang_get( 'projection' ); 141 } 142 } 143 144 # -------------------- 145 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 146 function print_column_title_eta( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 147 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 148 echo '<td>'; 149 print_view_bug_sort_link( lang_get( 'eta' ), 'eta', $p_sort, $p_dir, $p_columns_target ); 150 print_sort_icon( $p_dir, $p_sort, 'eta' ); 151 echo '</td>'; 152 } else { 153 echo lang_get( 'eta' ); 154 } 155 } 156 157 # -------------------- 158 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 159 function print_column_title_resolution( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 160 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 161 echo '<td>'; 162 print_view_bug_sort_link( lang_get( 'resolution' ), 'resolution', $p_sort, $p_dir, $p_columns_target ); 163 print_sort_icon( $p_dir, $p_sort, 'resolution' ); 164 echo '</td>'; 165 } else { 166 echo lang_get( 'resolution' ); 167 } 168 } 169 170 # -------------------- 171 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 172 function print_column_title_fixed_in_version( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 173 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 174 echo '<td>'; 175 print_view_bug_sort_link( lang_get( 'fixed_in_version' ), 'fixed_in_version', $p_sort, $p_dir, $p_columns_target ); 176 print_sort_icon( $p_dir, $p_sort, 'fixed_in_version' ); 177 echo '</td>'; 178 } else { 179 echo lang_get( 'fixed_in_version' ); 180 } 181 } 182 183 # -------------------- 184 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 185 function print_column_title_target_version( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 186 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 187 echo '<td>'; 188 print_view_bug_sort_link( lang_get( 'target_version' ), 'target_version', $p_sort, $p_dir, $p_columns_target ); 189 print_sort_icon( $p_dir, $p_sort, 'target_version' ); 190 echo '</td>'; 191 } else { 192 echo lang_get( 'target_version' ); 193 } 194 } 195 196 # -------------------- 197 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 198 function print_column_title_view_state( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 199 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 200 echo '<td>'; 201 print_view_bug_sort_link( lang_get( 'view_status' ), 'view_state', $p_sort, $p_dir, $p_columns_target ); 202 print_sort_icon( $p_dir, $p_sort, 'view_state' ); 203 echo '</td>'; 204 } else { 205 echo lang_get( 'view_status' ); 206 } 207 } 208 209 # -------------------- 210 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 211 function print_column_title_os( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 212 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 213 echo '<td>'; 214 print_view_bug_sort_link( lang_get( 'os' ), 'os', $p_sort, $p_dir, $p_columns_target ); 215 print_sort_icon( $p_dir, $p_sort, 'os' ); 216 echo '</td>'; 217 } else { 218 echo lang_get( 'os' ); 219 } 220 } 221 222 # -------------------- 223 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 224 function print_column_title_os_build( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 225 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 226 echo '<td>'; 227 print_view_bug_sort_link( lang_get( 'os_version' ), 'os_build', $p_sort, $p_dir, $p_columns_target ); 228 print_sort_icon( $p_dir, $p_sort, 'os_build' ); 229 echo '</td>'; 230 } else { 231 echo lang_get( 'os_version' ); 232 } 233 } 234 235 # -------------------- 236 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 237 function print_column_title_platform( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 238 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 239 echo '<td>'; 240 print_view_bug_sort_link( lang_get( 'platform' ), 'platform', $p_sort, $p_dir, $p_columns_target ); 241 print_sort_icon( $p_dir, $p_sort, 'platform' ); 242 echo '</td>'; 243 } else { 244 echo lang_get( 'platform' ); 245 } 246 } 247 248 # -------------------- 249 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 250 function print_column_title_version( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 251 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 252 echo '<td>'; 253 print_view_bug_sort_link( lang_get( 'product_version' ), 'version', $p_sort, $p_dir, $p_columns_target ); 254 print_sort_icon( $p_dir, $p_sort, 'version' ); 255 echo '</td>'; 256 } else { 257 echo lang_get( 'product_version' ); 258 } 259 } 260 261 # -------------------- 262 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 263 function print_column_title_date_submitted( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 264 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 265 echo '<td>'; 266 print_view_bug_sort_link( lang_get( 'date_submitted' ), 'date_submitted', $p_sort, $p_dir, $p_columns_target ); 267 print_sort_icon( $p_dir, $p_sort, 'date_submitted' ); 268 echo '</td>'; 269 } else { 270 echo lang_get( 'date_submitted' ); 271 } 272 } 273 274 # -------------------- 275 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 276 function print_column_title_attachment( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 277 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 278 global $t_icon_path; 279 280 $t_show_attachments = config_get( 'show_attachment_indicator' ); 281 282 if ( ON == $t_show_attachments ) { 283 echo "\t<td>"; 284 echo '<img src="' . $t_icon_path . 'attachment.png' . '" alt="" />'; 285 echo "</td>\n"; 286 } 287 } 288 } 289 290 # -------------------- 291 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 292 function print_column_title_category( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 293 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 294 echo '<td>'; 295 print_view_bug_sort_link( lang_get( 'category' ), 'category', $p_sort, $p_dir, $p_columns_target ); 296 print_sort_icon( $p_dir, $p_sort, 'category' ); 297 echo '</td>'; 298 } else { 299 echo lang_get( 'category' ); 300 } 301 } 302 303 # -------------------- 304 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 305 function print_column_title_sponsorship_total( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 306 $t_enable_sponsorship = config_get( 'enable_sponsorship' ); 307 308 if ( ON == $t_enable_sponsorship ) { 309 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 310 echo "\t<td>"; 311 print_view_bug_sort_link( sponsorship_get_currency(), 'sponsorship_total', $p_sort, $p_dir, $p_columns_target ); 312 print_sort_icon( $p_dir, $p_sort, 'sponsorship_total' ); 313 echo "</td>\n"; 314 } else { 315 echo sponsorship_get_currency(); 316 } 317 } 318 } 319 320 # -------------------- 321 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 322 function print_column_title_severity( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 323 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 324 echo '<td>'; 325 print_view_bug_sort_link( lang_get( 'severity' ), 'severity', $p_sort, $p_dir, $p_columns_target ); 326 print_sort_icon( $p_dir, $p_sort, 'severity' ); 327 echo '</td>'; 328 } else { 329 echo lang_get( 'severity' ); 330 } 331 } 332 333 # -------------------- 334 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 335 function print_column_title_status( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 336 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 337 echo '<td>'; 338 print_view_bug_sort_link( lang_get( 'status' ), 'status', $p_sort, $p_dir, $p_columns_target ); 339 print_sort_icon( $p_dir, $p_sort, 'status' ); 340 echo '</td>'; 341 } else { 342 echo lang_get( 'status' ); 343 } 344 } 345 346 # -------------------- 347 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 348 function print_column_title_last_updated( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 349 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 350 echo '<td>'; 351 print_view_bug_sort_link( lang_get( 'updated' ), 'last_updated', $p_sort, $p_dir, $p_columns_target ); 352 print_sort_icon( $p_dir, $p_sort, 'last_updated' ); 353 echo '</td>'; 354 } else { 355 echo lang_get( 'updated' ); 356 } 357 } 358 359 # -------------------- 360 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 361 function print_column_title_summary( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 362 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 363 echo '<td>'; 364 print_view_bug_sort_link( lang_get( 'summary' ), 'summary', $p_sort, $p_dir, $p_columns_target ); 365 print_sort_icon( $p_dir, $p_sort, 'summary' ); 366 echo '</td>'; 367 } else { 368 echo lang_get( 'summary' ); 369 } 370 } 371 372 # -------------------- 373 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 374 function print_column_title_bugnotes_count( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 375 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 376 echo '<td> # </td>'; 377 } else { 378 echo '#'; 379 } 380 } 381 382 # -------------------- 383 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 384 function print_column_selection( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 385 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 386 global $t_checkboxes_exist, $t_update_bug_threshold; 387 388 echo '<td>'; 389 if ( access_has_bug_level( $t_update_bug_threshold, $p_row['id'] ) ) { 390 $t_checkboxes_exist = true; 391 printf( "<input type=\"checkbox\" name=\"bug_arr[]\" value=\"%d\" />" , $p_row['id'] ); 392 } else { 393 echo " "; 394 } 395 echo '</td>'; 396 } 397 } 398 399 # -------------------- 400 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 401 function print_column_edit( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 402 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 403 global $t_icon_path, $t_update_bug_threshold; 404 405 echo '<td>'; 406 if ( !bug_is_readonly( $p_row['id'] ) 407 && access_has_bug_level( $t_update_bug_threshold, $p_row['id'] ) ) { 408 echo '<a href="' . string_get_bug_update_url( $p_row['id'] ) . '">'; 409 echo '<img border="0" width="16" height="16" src="' . $t_icon_path . 'update.png'; 410 echo '" alt="' . lang_get( 'update_bug_button' ) . '"'; 411 echo ' title="' . lang_get( 'update_bug_button' ) . '" /></a>'; 412 } else { 413 echo ' '; 414 } 415 echo '</td>'; 416 } 417 } 418 419 # -------------------- 420 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 421 function print_column_priority( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 422 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 423 echo '<td>'; 424 if ( ON == config_get( 'show_priority_text' ) ) { 425 print_formatted_priority_string( $p_row['status'], $p_row['priority'] ); 426 } else { 427 print_status_icon( $p_row['priority'] ); 428 } 429 echo '</td>'; 430 } else { 431 echo get_enum_element( 'priority', $p_row['priority'] ); 432 } 433 } 434 435 # -------------------- 436 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 437 function print_column_id( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 438 echo '<td>'; 439 print_bug_link( $p_row['id'], false ); 440 echo '</td>'; 441 } 442 443 # -------------------- 444 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 445 function print_column_sponsorship_total( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 446 $t_enable_sponsorship = config_get( 'enable_sponsorship' ); 447 448 if ( $t_enable_sponsorship == ON ) { 449 echo "\t<td class=\"right\">"; 450 if ( $p_row['sponsorship_total'] > 0 ) { 451 $t_sponsorship_amount = sponsorship_format_amount( $p_row['sponsorship_total'] ); 452 echo string_no_break( $t_sponsorship_amount ); 453 } 454 echo "</td>\n"; 455 } 456 } 457 458 # -------------------- 459 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 460 function print_column_bugnotes_count( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 461 global $t_filter; 462 463 # grab the bugnote count 464 $t_bugnote_stats = bug_get_bugnote_stats( $p_row['id'] ); 465 if ( NULL !== $t_bugnote_stats ) { 466 $bugnote_count = $t_bugnote_stats['count']; 467 $v_bugnote_updated = $t_bugnote_stats['last_modified']; 468 } else { 469 $bugnote_count = 0; 470 } 471 472 echo '<td class="center">'; 473 if ( $bugnote_count > 0 ) { 474 $t_bugnote_link = '<a href="' . string_get_bug_view_url( $p_row['id'] ) 475 . '&nbn=' . $bugnote_count . '#bugnotes">' 476 . $bugnote_count . '</a>'; 477 478 if ( $v_bugnote_updated > strtotime( '-'.$t_filter['highlight_changed'].' hours' ) ) { 479 printf( '<span class="bold">%s</span>', $t_bugnote_link ); 480 } else { 481 echo $t_bugnote_link; 482 } 483 } else { 484 echo ' '; 485 } 486 echo '</td>'; 487 } 488 489 # -------------------- 490 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 491 function print_column_attachment( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 492 global $t_icon_path; 493 494 $t_show_attachments = config_get( 'show_attachment_indicator' ); 495 496 # Check for attachments 497 $t_attachment_count = 0; 498 if ( ( ON == $t_show_attachments ) 499 && ( file_can_view_bug_attachments( $p_row['id'] ) ) ) { 500 $t_attachment_count = file_bug_attachment_count( $p_row['id'] ); 501 } 502 503 if ( ON == $t_show_attachments ) { 504 echo "\t<td>"; 505 if ( 0 < $t_attachment_count ) { 506 echo '<a href="' . string_get_bug_view_url( $p_row['id'] ) . '#attachments">'; 507 echo '<img border="0" src="' . $t_icon_path . 'attachment.png' . '"'; 508 echo ' alt="' . lang_get( 'attachment_alt' ) . '"'; 509 echo ' title="' . $t_attachment_count . ' ' . lang_get( 'attachments' ) . '"'; 510 echo ' />'; 511 echo '</a>'; 512 } else { 513 echo ' '; 514 } 515 echo "</td>\n"; 516 } 517 } 518 519 # -------------------- 520 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 521 function print_column_category( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 522 global $t_sort, $t_dir; 523 524 # grab the project name 525 $t_project_name = project_get_field( $p_row['project_id'], 'name' ); 526 527 echo '<td class="center">'; 528 529 # type project name if viewing 'all projects' or if issue is in a subproject 530 if ( ON == config_get( 'show_bug_project_links' ) 531 && helper_get_current_project() != $p_row['project_id'] ) { 532 echo '<small>['; 533 print_view_bug_sort_link( $t_project_name, 'project_id', $t_sort, $t_dir, $p_columns_target ); 534 echo ']</small><br />'; 535 } 536 537 echo string_display( $p_row['category'] ); 538 echo '</td>'; 539 } 540 541 # -------------------- 542 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 543 function print_column_severity( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 544 echo '<td class="center">'; 545 print_formatted_severity_string( $p_row['status'], $p_row['severity'] ); 546 echo '</td>'; 547 } 548 549 # -------------------- 550 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 551 function print_column_eta( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 552 if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { 553 echo '<td class="center">', get_enum_element( 'eta', $p_row['eta'] ), '</td>'; 554 } else { 555 echo get_enum_element( 'eta', $p_row['eta'] ); 556 } 557 } 558 559 # -------------------- 560 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 561 function print_column_resolution( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 562 echo '<td class="center">', get_enum_element( 'resolution', $p_row['resolution'] ), '</td>'; 563 } 564 565 # -------------------- 566 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 567 function print_column_status( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 568 echo '<td class="center">'; 569 printf( '<span class="issue-status" title="%s">%s</span>' 570 , get_enum_element( 'resolution', $p_row['resolution'] ) 571 , get_enum_element( 'status', $p_row['status'] ) 572 ); 573 574 # print username instead of status 575 if ( ( ON == config_get( 'show_assigned_names' ) ) 576 && ( $p_row['handler_id'] > 0 ) 577 && ( access_has_bug_level( config_get( 'view_handler_threshold' ), $p_row['id'] ) ) ) { 578 printf( ' (%s)', prepare_user_name( $p_row['handler_id'] ) ); 579 } 580 echo '</td>'; 581 } 582 583 # -------------------- 584 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 585 function print_column_handler_id( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 586 echo '<td class="center">'; 587 if ( ( $p_row['handler_id'] > 0 ) && ( access_has_bug_level( config_get( 'view_handler_threshold' ), $p_row['id'] ) ) ) { 588 echo prepare_user_name( $p_row['handler_id'] ); 589 } 590 echo '</td>'; 591 } 592 593 # -------------------- 594 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 595 function print_column_reporter_id( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 596 echo '<td class="center">'; 597 echo prepare_user_name( $p_row['reporter_id'] ); 598 echo '</td>'; 599 } 600 601 # -------------------- 602 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 603 function print_column_last_updated( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 604 global $t_filter; 605 606 $t_last_updated = date( config_get( 'short_date_format' ), $p_row['last_updated'] ); 607 608 echo '<td class="center">'; 609 if ( $p_row['last_updated'] > strtotime( '-'.$t_filter['highlight_changed'].' hours' ) ) { 610 printf( '<span class="bold">%s</span>', $t_last_updated ); 611 } else { 612 echo $t_last_updated; 613 } 614 echo '</td>'; 615 } 616 617 # -------------------- 618 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 619 function print_column_date_submitted( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 620 $t_date_submitted = date( config_get( 'short_date_format' ), $p_row['date_submitted'] ); 621 622 echo '<td class="center">', $t_date_submitted, '</td>'; 623 } 624 625 # -------------------- 626 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 627 function print_column_summary( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 628 global $t_icon_path; 629 630 if ( $p_columns_target == COLUMNS_TARGET_CSV_PAGE ) { 631 $t_summary = string_attribute( $p_row['summary'] ); 632 } else { 633 $t_summary = string_display_line_links( $p_row['summary'] ); 634 } 635 636 echo '<td class="left">', $t_summary; 637 if ( VS_PRIVATE == $p_row['view_state'] ) { 638 printf( ' <img src="%s" alt="(%s)" title="%s" />' 639 , $t_icon_path . 'protected.gif' 640 , lang_get( 'private' ) 641 , lang_get( 'private' ) 642 ); 643 } 644 echo '</td>'; 645 } 646 647 # -------------------- 648 # $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php 649 function print_column_target_version( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { 650 echo '<td>'; 651 if ( access_has_bug_level( config_get( 'roadmap_view_threshold' ), $p_row['id'] ) ) { 652 echo $p_row['target_version']; 653 } 654 echo '</td>'; 655 } 656 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Thu Nov 29 09:42:17 2007 | par Balluche grâce à PHPXref 0.7 |
|