| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: project_issue_project.view.php,v 1.1 2009/06/18 03:38:43 dww Exp $ 3 4 /** 5 * @file 6 * Issue queue for a specific project. 7 */ 8 9 $view = new view; 10 $view->name = 'project_issue_project'; 11 $view->description = 'Project issues by project'; 12 $view->tag = 'Project issue'; 13 $view->view_php = ''; 14 $view->base_table = 'node'; 15 $view->is_cacheable = FALSE; 16 $view->api_version = 2; 17 $view->disabled = FALSE; 18 $handler = $view->new_display('default', 'Defaults', 'default'); 19 $handler->override_option('relationships', array( 20 'assigned' => array( 21 'label' => 'Assigned user', 22 'required' => 1, 23 'id' => 'assigned', 24 'table' => 'project_issues', 25 'field' => 'assigned', 26 'relationship' => 'none', 27 ), 28 'rid' => array( 29 'label' => 'Version', 30 'required' => 0, 31 'id' => 'rid', 32 'table' => 'project_issues', 33 'field' => 'rid', 34 'relationship' => 'none', 35 ), 36 )); 37 $fields = array( 38 'title' => array( 39 'label' => 'Summary', 40 'link_to_node' => 1, 41 'exclude' => 0, 42 'id' => 'title', 43 'table' => 'node', 44 'field' => 'title', 45 'relationship' => 'none', 46 ), 47 'timestamp' => array( 48 'label' => '', 49 'alter' => array(), 50 'link_to_node' => 0, 51 'comments' => 0, 52 'exclude' => 0, 53 'id' => 'timestamp', 54 'table' => 'history_user', 55 'field' => 'timestamp', 56 'relationship' => 'none', 57 ), 58 'sid' => array( 59 'id' => 'sid', 60 'table' => 'project_issues', 61 'field' => 'sid', 62 ), 63 'priority' => array( 64 'id' => 'priority', 65 'table' => 'project_issues', 66 'field' => 'priority', 67 ), 68 'category' => array( 69 'label' => 'Category', 70 'link_to_node' => 0, 71 'exclude' => 0, 72 'id' => 'category', 73 'table' => 'project_issues', 74 'field' => 'category', 75 'relationship' => 'none', 76 ), 77 'version' => array( 78 'label' => 'Version', 79 'link_to_node' => 0, 80 'exclude' => 0, 81 'id' => 'version', 82 'table' => 'project_release_nodes', 83 'field' => 'version', 84 'relationship' => 'rid', 85 ), 86 'component' => array( 87 'label' => 'Component', 88 'link_to_node' => 0, 89 'exclude' => 0, 90 'id' => 'component', 91 'table' => 'project_issues', 92 'field' => 'component', 93 'relationship' => 'none', 94 ), 95 'comment_count' => array( 96 'label' => 'Replies', 97 'set_precision' => FALSE, 98 'precision' => 0, 99 'decimal' => '.', 100 'separator' => ',', 101 'prefix' => '', 102 'suffix' => '', 103 'exclude' => 0, 104 'id' => 'comment_count', 105 'table' => 'node_comment_statistics', 106 'field' => 'comment_count', 107 'relationship' => 'none', 108 ), 109 'new_comments' => array( 110 'label' => 'New replies', 111 'set_precision' => FALSE, 112 'precision' => 0, 113 'decimal' => '.', 114 'separator' => ',', 115 'prefix' => '', 116 'suffix' => ' new', 117 'link_to_comment' => 1, 118 'no_empty' => 1, 119 'exclude' => 0, 120 'id' => 'new_comments', 121 'table' => 'node', 122 'field' => 'new_comments', 123 'relationship' => 'none', 124 ), 125 'last_comment_timestamp' => array( 126 'label' => 'Last updated', 127 'date_format' => 'raw time ago', 128 'custom_date_format' => '', 129 'exclude' => 0, 130 'id' => 'last_comment_timestamp', 131 'table' => 'node_comment_statistics', 132 'field' => 'last_comment_timestamp', 133 'relationship' => 'none', 134 ), 135 'name' => array( 136 'label' => 'Assigned to', 137 'link_to_user' => 1, 138 'overwrite_anonymous' => 1, 139 'anonymous_text' => '', 140 'exclude' => 0, 141 'id' => 'name', 142 'table' => 'users', 143 'field' => 'name', 144 'relationship' => 'assigned', 145 ), 146 ); 147 if (module_exists('search')) { 148 $fields['score'] = array( 149 'label' => 'Score', 150 'alter' => array(), 151 'set_precision' => 1, 152 'precision' => '3', 153 'decimal' => '.', 154 'separator' => ',', 155 'prefix' => '', 156 'suffix' => '', 157 'alternate_sort' => 'last_comment_timestamp', 158 'alternate_order' => 'desc', 159 'exclude' => 0, 160 'id' => 'score', 161 'table' => 'search_index', 162 'field' => 'score', 163 'relationship' => 'none', 164 ); 165 } 166 $handler->override_option('fields', $fields); 167 $handler->override_option('arguments', array( 168 'pid' => array( 169 'default_action' => 'not found', 170 'style_plugin' => 'default_summary', 171 'style_options' => array(), 172 'wildcard' => '', 173 'wildcard_substitution' => '', 174 'title' => 'Issues for %1', 175 'default_argument_type' => 'fixed', 176 'default_argument' => '', 177 'validate_type' => 'project_nid', 178 'validate_fail' => 'not found', 179 'break_phrase' => 0, 180 'not' => 0, 181 'id' => 'pid', 182 'table' => 'project_issues', 183 'field' => 'pid', 184 'relationship' => 'none', 185 'default_options_div_prefix' => '', 186 'default_argument_user' => 0, 187 'default_argument_fixed' => '', 188 'default_argument_php' => '', 189 ), 190 )); 191 $sorts['last_comment_timestamp'] = array( 192 'order' => 'DESC', 193 'granularity' => 'second', 194 'id' => 'last_comment_timestamp', 195 'table' => 'node_comment_statistics', 196 'field' => 'last_comment_timestamp', 197 'relationship' => 'none', 198 ); 199 if (module_exists('search')) { 200 $sorts['score'] = array( 201 'order' => 'DESC', 202 'id' => 'score', 203 'table' => 'search_index', 204 'field' => 'score', 205 'relationship' => 'none', 206 ); 207 } 208 $handler->override_option('sorts', $sorts); 209 $filters = array( 210 'status_extra' => array( 211 'operator' => '=', 212 'value' => '', 213 'group' => '0', 214 'exposed' => FALSE, 215 'expose' => array( 216 'operator' => FALSE, 217 'label' => '', 218 ), 219 'id' => 'status_extra', 220 'table' => 'node', 221 'field' => 'status_extra', 222 'relationship' => 'none', 223 ), 224 'sid' => array( 225 'operator' => 'in', 226 'value' => array( 227 'Open' => 'Open', 228 ), 229 'group' => '0', 230 'exposed' => TRUE, 231 'expose' => array( 232 'use_operator' => 0, 233 'operator' => 'sid_op', 234 'identifier' => 'status', 235 'label' => 'Status', 236 'optional' => 1, 237 'single' => 1, 238 'remember' => 0, 239 'reduce' => 0, 240 ), 241 'id' => 'sid', 242 'table' => 'project_issues', 243 'field' => 'sid', 244 'relationship' => 'none', 245 ), 246 'priority' => array( 247 'operator' => 'in', 248 'value' => array(), 249 'group' => '0', 250 'exposed' => TRUE, 251 'expose' => array( 252 'use_operator' => 0, 253 'operator' => 'priority_op', 254 'identifier' => 'priorities', 255 'label' => 'Priority', 256 'optional' => 1, 257 'single' => 1, 258 'remember' => 0, 259 'reduce' => 0, 260 ), 261 'id' => 'priority', 262 'table' => 'project_issues', 263 'field' => 'priority', 264 'relationship' => 'none', 265 ), 266 'category' => array( 267 'operator' => 'in', 268 'value' => array(), 269 'group' => '0', 270 'exposed' => TRUE, 271 'expose' => array( 272 'use_operator' => 0, 273 'operator' => 'category_op', 274 'identifier' => 'categories', 275 'label' => 'Category', 276 'optional' => 1, 277 'single' => 1, 278 'remember' => 0, 279 'reduce' => 0, 280 ), 281 'id' => 'category', 282 'table' => 'project_issues', 283 'field' => 'category', 284 'relationship' => 'none', 285 ), 286 'rid' => array( 287 'operator' => 'in', 288 'value' => array(), 289 'group' => '0', 290 'exposed' => TRUE, 291 'expose' => array( 292 'use_operator' => 0, 293 'operator' => 'rid_op', 294 'identifier' => 'version', 295 'label' => 'Version', 296 'optional' => 1, 297 'single' => 1, 298 'remember' => 0, 299 'reduce' => 0, 300 ), 301 'id' => 'rid', 302 'table' => 'project_issues', 303 'field' => 'rid', 304 'relationship' => 'none', 305 ), 306 'component' => array( 307 'operator' => 'in', 308 'value' => array(), 309 'group' => '0', 310 'exposed' => TRUE, 311 'expose' => array( 312 'use_operator' => 0, 313 'operator' => 'component_op', 314 'identifier' => 'component', 315 'label' => 'Component', 316 'optional' => 1, 317 'single' => 1, 318 'remember' => 0, 319 'reduce' => 0, 320 ), 321 'id' => 'component', 322 'table' => 'project_issues', 323 'field' => 'component', 324 'relationship' => 'none', 325 ), 326 ); 327 if (module_exists('search')) { 328 $search_filter['keys'] = array( 329 'operator' => 'optional', 330 'value' => '', 331 'group' => '0', 332 'exposed' => TRUE, 333 'expose' => array( 334 'use_operator' => 0, 335 'operator' => 'keys_op', 336 'identifier' => 'text', 337 'label' => 'Search for', 338 'optional' => 1, 339 'remember' => 0, 340 ), 341 'id' => 'keys', 342 'table' => 'search_index', 343 'field' => 'keys', 344 'relationship' => 'none', 345 ); 346 $filters = $search_filter + $filters; 347 } 348 $handler->override_option('filters', $filters); 349 $handler->override_option('access', array( 350 'type' => 'none', 351 )); 352 $handler->override_option('title', 'Issues by project'); 353 $handler->override_option('empty', 'No issues match your criteria.'); 354 $handler->override_option('empty_format', '1'); 355 $handler->override_option('items_per_page', 50); 356 $handler->override_option('use_pager', '1'); 357 $handler->override_option('style_plugin', 'project_issue_table'); 358 $handler->override_option('style_options', array( 359 'grouping' => '', 360 'override' => 1, 361 'sticky' => 1, 362 'order' => 'desc', 363 'columns' => array( 364 'title' => 'title', 365 'timestamp' => 'title', 366 'sid' => 'sid', 367 'priority' => 'priority', 368 'category' => 'category', 369 'version' => 'version', 370 'component' => 'component', 371 'comment_count' => 'comment_count', 372 'new_comments' => 'comment_count', 373 'last_comment_timestamp' => 'last_comment_timestamp', 374 'name' => 'name', 375 'score' => 'score', 376 ), 377 'info' => array( 378 'title' => array( 379 'sortable' => 1, 380 'separator' => '', 381 ), 382 'timestamp' => array( 383 'separator' => '', 384 ), 385 'sid' => array( 386 'sortable' => 1, 387 'separator' => '', 388 ), 389 'priority' => array( 390 'sortable' => 1, 391 'separator' => '', 392 ), 393 'category' => array( 394 'sortable' => 1, 395 'separator' => '', 396 ), 397 'version' => array( 398 'sortable' => 1, 399 'separator' => '', 400 ), 401 'component' => array( 402 'sortable' => 1, 403 'separator' => '', 404 ), 405 'comment_count' => array( 406 'sortable' => 1, 407 'separator' => '<br />', 408 ), 409 'new_comments' => array( 410 'separator' => '', 411 ), 412 'last_comment_timestamp' => array( 413 'sortable' => 1, 414 'separator' => '', 415 ), 416 'name' => array( 417 'sortable' => 1, 418 'separator' => '', 419 ), 420 'score' => array( 421 'sortable' => 1, 422 'separator' => '', 423 ), 424 ), 425 'default' => module_exists('search') ? 'score' : 'last_comment_timestamp', 426 )); 427 $handler = $view->new_display('page', 'Page', 'page_1'); 428 $handler->override_option('path', 'project/issues/%'); 429 $handler->override_option('menu', array( 430 'type' => 'none', 431 'title' => '', 432 'description' => '', 433 'weight' => '0', 434 'name' => '', 435 )); 436 $handler->override_option('tab_options', array( 437 'type' => 'none', 438 'title' => '', 439 'description' => '', 440 'weight' => 0, 441 )); 442 $handler = $view->new_display('feed', 'Feed', 'feed_1'); 443 $handler->override_option('sorts', array( 444 'last_comment_timestamp' => array( 445 'order' => 'DESC', 446 'granularity' => 'second', 447 'id' => 'last_comment_timestamp', 448 'table' => 'node_comment_statistics', 449 'field' => 'last_comment_timestamp', 450 'override' => array( 451 'button' => 'Use default', 452 ), 453 'relationship' => 'none', 454 ), 455 )); 456 $handler->override_option('style_plugin', 'rss'); 457 $handler->override_option('style_options', array( 458 'mission_description' => FALSE, 459 'description' => '', 460 )); 461 $handler->override_option('row_plugin', 'node_rss'); 462 $handler->override_option('path', 'project/issues/rss/%'); 463 $handler->override_option('menu', array( 464 'type' => 'none', 465 'title' => '', 466 'description' => '', 467 'weight' => 0, 468 'name' => '', 469 )); 470 $handler->override_option('tab_options', array( 471 'type' => 'none', 472 'title' => '', 473 'description' => '', 474 'weight' => 0, 475 )); 476 $handler->override_option('displays', array( 477 'page_1' => 'page_1', 478 'default' => 0, 479 )); 480 $handler->override_option('sitename_title', FALSE); 481 $handler = $view->new_display('block', 'Block', 'block_1'); 482 $handler->override_option('title', 'Recent issues'); 483 $handler->override_option('relationships', array()); 484 $handler->override_option('fields', array( 485 'title' => array( 486 'label' => '', 487 'alter' => array(), 488 'link_to_node' => 1, 489 'exclude' => 0, 490 'id' => 'title', 491 'table' => 'node', 492 'field' => 'title', 493 'relationship' => 'none', 494 'override' => array( 495 'button' => 'Use default', 496 ), 497 ), 498 'timestamp' => array( 499 'label' => '', 500 'alter' => array(), 501 'link_to_node' => 0, 502 'comments' => 0, 503 'exclude' => 0, 504 'id' => 'timestamp', 505 'table' => 'history_user', 506 'field' => 'timestamp', 507 'relationship' => 'none', 508 ), 509 )); 510 $handler->override_option('sorts', array( 511 'last_comment_timestamp' => array( 512 'order' => 'DESC', 513 'granularity' => 'second', 514 'id' => 'last_comment_timestamp', 515 'table' => 'node_comment_statistics', 516 'field' => 'last_comment_timestamp', 517 'relationship' => 'none', 518 ), 519 )); 520 $handler->override_option('arguments', array( 521 'pid' => array( 522 'default_action' => 'default', 523 'style_plugin' => 'default_summary', 524 'style_options' => array(), 525 'wildcard' => '', 526 'wildcard_substitution' => '', 527 'default_argument_type' => 'node', 528 'default_argument' => '', 529 'validate_type' => 'project_nid', 530 'validate_fail' => 'not found', 531 'break_phrase' => 0, 532 'not' => 0, 533 'id' => 'pid', 534 'table' => 'project_issues', 535 'field' => 'pid', 536 'relationship' => 'none', 537 ), 538 )); 539 $handler->override_option('filters', array( 540 'status_extra' => array( 541 'operator' => '=', 542 'value' => '', 543 'group' => '0', 544 'exposed' => FALSE, 545 'expose' => array(), 546 'id' => 'status_extra', 547 'table' => 'node', 548 'field' => 'status_extra', 549 'relationship' => 'none', 550 ), 551 'sid' => array( 552 'operator' => 'in', 553 'value' => array( 554 'Open' => 'Open', 555 ), 556 'group' => '0', 557 'exposed' => FALSE, 558 'expose' => array(), 559 'id' => 'sid', 560 'table' => 'project_issues', 561 'field' => 'sid', 562 'relationship' => 'none', 563 ), 564 )); 565 $handler->override_option('items_per_page', 5); 566 $handler->override_option('use_pager', '0'); 567 $handler->override_option('style_plugin', 'list'); 568 $handler->override_option('style_options', array( 569 'grouping' => '', 570 'type' => 'ul', 571 )); 572 $handler->override_option('row_options', array( 573 'inline' => array( 574 'title' => 'title', 575 'timestamp' => 'timestamp', 576 ), 577 'separator' => ' ', 578 )); 579 $handler->override_option('block_description', 'Project: recent issues'); 580 $handler->override_option('block_caching', -1); 581
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |