| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: project_issue_search_all.view.php,v 1.1 2009/06/18 03:38:43 dww Exp $ 3 4 /** 5 * @file 6 * Advanced issue search for all projects. 7 */ 8 9 $view = new view; 10 $view->name = 'project_issue_search_all'; 11 $view->description = 'Project issue advanced search for all projects'; 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 'pid' => array( 37 'label' => 'Project node', 38 'required' => 1, 39 'id' => 'pid', 40 'table' => 'project_issues', 41 'field' => 'pid', 42 ), 43 )); 44 $fields = array( 45 'project_issue_queue' => array( 46 'label' => 'Project', 47 'link_type' => 'search', 48 'exclude' => 0, 49 'id' => 'project_issue_queue', 50 'table' => 'node', 51 'field' => 'project_issue_queue', 52 'relationship' => 'pid', 53 ), 54 'title' => array( 55 'label' => 'Summary', 56 'link_to_node' => 1, 57 'exclude' => 0, 58 'id' => 'title', 59 'table' => 'node', 60 'field' => 'title', 61 'relationship' => 'none', 62 ), 63 'timestamp' => array( 64 'label' => '', 65 'alter' => array(), 66 'link_to_node' => 0, 67 'comments' => 0, 68 'exclude' => 0, 69 'id' => 'timestamp', 70 'table' => 'history_user', 71 'field' => 'timestamp', 72 'relationship' => 'none', 73 ), 74 'sid' => array( 75 'id' => 'sid', 76 'table' => 'project_issues', 77 'field' => 'sid', 78 ), 79 'priority' => array( 80 'id' => 'priority', 81 'table' => 'project_issues', 82 'field' => 'priority', 83 ), 84 'category' => array( 85 'label' => 'Category', 86 'link_to_node' => 0, 87 'exclude' => 0, 88 'id' => 'category', 89 'table' => 'project_issues', 90 'field' => 'category', 91 'relationship' => 'none', 92 ), 93 'version' => array( 94 'label' => 'Version', 95 'link_to_node' => 0, 96 'exclude' => 0, 97 'id' => 'version', 98 'table' => 'project_release_nodes', 99 'field' => 'version', 100 'relationship' => 'rid', 101 ), 102 'comment_count' => array( 103 'label' => 'Replies', 104 'set_precision' => FALSE, 105 'precision' => 0, 106 'decimal' => '.', 107 'separator' => ',', 108 'prefix' => '', 109 'suffix' => '', 110 'exclude' => 0, 111 'id' => 'comment_count', 112 'table' => 'node_comment_statistics', 113 'field' => 'comment_count', 114 'relationship' => 'none', 115 ), 116 'new_comments' => array( 117 'label' => 'New replies', 118 'set_precision' => FALSE, 119 'precision' => 0, 120 'decimal' => '.', 121 'separator' => ',', 122 'prefix' => '', 123 'suffix' => ' new', 124 'link_to_comment' => 1, 125 'no_empty' => 1, 126 'exclude' => 0, 127 'id' => 'new_comments', 128 'table' => 'node', 129 'field' => 'new_comments', 130 'relationship' => 'none', 131 ), 132 'last_comment_timestamp' => array( 133 'label' => 'Last updated', 134 'date_format' => 'raw time ago', 135 'custom_date_format' => '', 136 'exclude' => 0, 137 'id' => 'last_comment_timestamp', 138 'table' => 'node_comment_statistics', 139 'field' => 'last_comment_timestamp', 140 'relationship' => 'none', 141 ), 142 'name' => array( 143 'label' => 'Assigned to', 144 'link_to_user' => 1, 145 'overwrite_anonymous' => 1, 146 'anonymous_text' => '', 147 'exclude' => 0, 148 'id' => 'name', 149 'table' => 'users', 150 'field' => 'name', 151 'relationship' => 'assigned', 152 ), 153 ); 154 if (module_exists('search')) { 155 $fields['score'] = array( 156 'label' => 'Score', 157 'alter' => array(), 158 'set_precision' => 1, 159 'precision' => '3', 160 'decimal' => '.', 161 'separator' => ',', 162 'prefix' => '', 163 'suffix' => '', 164 'alternate_sort' => 'last_comment_timestamp', 165 'alternate_order' => 'desc', 166 'exclude' => 0, 167 'id' => 'score', 168 'table' => 'search_index', 169 'field' => 'score', 170 'relationship' => 'none', 171 ); 172 } 173 $handler->override_option('fields', $fields); 174 $sorts['last_comment_timestamp'] = array( 175 'order' => 'DESC', 176 'granularity' => 'second', 177 'id' => 'last_comment_timestamp', 178 'table' => 'node_comment_statistics', 179 'field' => 'last_comment_timestamp', 180 'relationship' => 'none', 181 ); 182 if (module_exists('search')) { 183 $sorts['score'] = array( 184 'order' => 'DESC', 185 'id' => 'score', 186 'table' => 'search_index', 187 'field' => 'score', 188 'relationship' => 'none', 189 ); 190 } 191 $handler->override_option('sorts', $sorts); 192 $filters = array( 193 'status_extra' => array( 194 'operator' => '=', 195 'value' => '', 196 'group' => '0', 197 'exposed' => FALSE, 198 'expose' => array( 199 'operator' => FALSE, 200 'label' => '', 201 ), 202 'id' => 'status_extra', 203 'table' => 'node', 204 'field' => 'status_extra', 205 'relationship' => 'none', 206 ), 207 'pid' => array( 208 'operator' => 'in', 209 'value' => '', 210 'group' => '0', 211 'exposed' => TRUE, 212 'expose' => array( 213 'operator' => 'pid_op', 214 'label' => 'Project', 215 'use_operator' => 0, 216 'identifier' => 'projects', 217 'optional' => 1, 218 'single' => 1, 219 'remember' => 0, 220 'reduce' => 0, 221 ), 222 'widget' => 'textfield', 223 'project_source' => 'all', 224 'project_uid_argument' => '', 225 'id' => 'pid', 226 'table' => 'project_issues', 227 'field' => 'pid', 228 'relationship' => 'none', 229 ), 230 'uid' => array( 231 'operator' => 'in', 232 'value' => '', 233 'group' => '0', 234 'exposed' => TRUE, 235 'expose' => array( 236 'use_operator' => 0, 237 'operator' => 'uid_op', 238 'identifier' => 'assigned', 239 'label' => 'Assigned', 240 'optional' => 1, 241 'remember' => 0, 242 'reduce' => 0, 243 ), 244 'id' => 'uid', 245 'table' => 'users', 246 'field' => 'uid', 247 'relationship' => 'assigned', 248 ), 249 'uid_1' => array( 250 'operator' => 'in', 251 'value' => '', 252 'group' => '0', 253 'exposed' => TRUE, 254 'expose' => array( 255 'use_operator' => 0, 256 'operator' => 'uid_1_op', 257 'identifier' => 'submitted', 258 'label' => 'Submitted by', 259 'optional' => 1, 260 'remember' => 0, 261 'reduce' => 0, 262 ), 263 'id' => 'uid_1', 264 'table' => 'users', 265 'field' => 'uid', 266 'relationship' => 'none', 267 ), 268 'uid_touch' => array( 269 'operator' => 'in', 270 'value' => '', 271 'group' => '0', 272 'exposed' => TRUE, 273 'expose' => array( 274 'use_operator' => 0, 275 'operator' => 'uid_touch_op', 276 'identifier' => 'participant', 277 'label' => 'Participant', 278 'optional' => 1, 279 'remember' => 0, 280 'reduce' => 0, 281 ), 282 'id' => 'uid_touch', 283 'table' => 'node', 284 'field' => 'uid_touch', 285 'relationship' => 'none', 286 ), 287 'sid' => array( 288 'operator' => 'in', 289 'value' => array(), 290 'group' => '0', 291 'exposed' => TRUE, 292 'expose' => array( 293 'use_operator' => 0, 294 'operator' => 'sid_op', 295 'identifier' => 'status', 296 'label' => 'Status', 297 'optional' => 1, 298 'single' => 0, 299 'remember' => 0, 300 'reduce' => 0, 301 ), 302 'id' => 'sid', 303 'table' => 'project_issues', 304 'field' => 'sid', 305 'relationship' => 'none', 306 ), 307 'priority' => array( 308 'operator' => 'in', 309 'value' => array(), 310 'group' => '0', 311 'exposed' => TRUE, 312 'expose' => array( 313 'use_operator' => 0, 314 'operator' => 'priority_op', 315 'identifier' => 'priorities', 316 'label' => 'Priority', 317 'optional' => 1, 318 'single' => 0, 319 'remember' => 0, 320 'reduce' => 0, 321 ), 322 'id' => 'priority', 323 'table' => 'project_issues', 324 'field' => 'priority', 325 'relationship' => 'none', 326 ), 327 'category' => array( 328 'operator' => 'in', 329 'value' => array(), 330 'group' => '0', 331 'exposed' => TRUE, 332 'expose' => array( 333 'use_operator' => 0, 334 'operator' => 'category_op', 335 'identifier' => 'categories', 336 'label' => 'Category', 337 'optional' => 1, 338 'single' => 0, 339 'remember' => 0, 340 'reduce' => 0, 341 ), 342 'id' => 'category', 343 'table' => 'project_issues', 344 'field' => 'category', 345 'relationship' => 'none', 346 ), 347 ); 348 if (module_exists('search')) { 349 $search_filter['keys'] = array( 350 'operator' => 'optional', 351 'value' => '', 352 'group' => '0', 353 'exposed' => TRUE, 354 'expose' => array( 355 'use_operator' => 0, 356 'operator' => 'keys_op', 357 'identifier' => 'text', 358 'label' => 'Search for', 359 'optional' => 1, 360 'remember' => 0, 361 ), 362 'id' => 'keys', 363 'table' => 'search_index', 364 'field' => 'keys', 365 'relationship' => 'none', 366 ); 367 $filters = $search_filter + $filters; 368 } 369 _project_issue_views_add_taxonomy_filters($filters); 370 $handler->override_option('filters', $filters); 371 $handler->override_option('access', array( 372 'type' => 'none', 373 )); 374 $handler->override_option('title', 'Search issues for all projects'); 375 $handler->override_option('empty', 'No issues match your criteria.'); 376 $handler->override_option('empty_format', '1'); 377 $handler->override_option('items_per_page', 50); 378 $handler->override_option('use_pager', '1'); 379 $handler->override_option('style_plugin', 'project_issue_table'); 380 $handler->override_option('style_options', array( 381 'grouping' => '', 382 'override' => 1, 383 'sticky' => 1, 384 'order' => 'desc', 385 'columns' => array( 386 'project_issue_queue' => 'project_issue_queue', 387 'title' => 'title', 388 'timestamp' => 'title', 389 'sid' => 'sid', 390 'priority' => 'priority', 391 'category' => 'category', 392 'version' => 'version', 393 'comment_count' => 'comment_count', 394 'new_comments' => 'comment_count', 395 'last_comment_timestamp' => 'last_comment_timestamp', 396 'name' => 'name', 397 'score' => 'score', 398 ), 399 'info' => array( 400 'project_issue_queue' => array( 401 'sortable' => 1, 402 'separator' => '', 403 ), 404 'title' => array( 405 'sortable' => 1, 406 'separator' => '', 407 ), 408 'timestamp' => array( 409 'separator' => '', 410 ), 411 'sid' => array( 412 'sortable' => 1, 413 'separator' => '', 414 ), 415 'priority' => array( 416 'sortable' => 1, 417 'separator' => '', 418 ), 419 'category' => array( 420 'sortable' => 1, 421 'separator' => '', 422 ), 423 'version' => array( 424 'sortable' => 1, 425 'separator' => '', 426 ), 427 'comment_count' => array( 428 'sortable' => 1, 429 'separator' => '<br />', 430 ), 431 'new_comments' => array( 432 'separator' => '', 433 ), 434 'last_comment_timestamp' => array( 435 'sortable' => 1, 436 'separator' => '', 437 ), 438 'name' => array( 439 'sortable' => 1, 440 'separator' => '', 441 ), 442 'score' => array( 443 'sortable' => 1, 444 'separator' => '', 445 ), 446 ), 447 'default' => module_exists('search') ? 'score' : 'last_comment_timestamp', 448 )); 449 $handler = $view->new_display('page', 'Page', 'page_1'); 450 $handler->override_option('path', 'project/issues/search'); 451 $handler->override_option('menu', array( 452 'type' => 'normal', 453 'title' => 'Advanced search', 454 'description' => '', 455 'weight' => '0', 456 'name' => 'navigation', 457 )); 458 $handler->override_option('tab_options', array( 459 'type' => 'none', 460 'title' => '', 461 'description' => '', 462 'weight' => 0, 463 )); 464 $handler = $view->new_display('feed', 'Feed', 'feed_1'); 465 $handler->override_option('sorts', array( 466 'last_comment_timestamp' => array( 467 'order' => 'DESC', 468 'granularity' => 'second', 469 'id' => 'last_comment_timestamp', 470 'table' => 'node_comment_statistics', 471 'field' => 'last_comment_timestamp', 472 'override' => array( 473 'button' => 'Use default', 474 ), 475 'relationship' => 'none', 476 ), 477 )); 478 $handler->override_option('style_plugin', 'rss'); 479 $handler->override_option('style_options', array( 480 'mission_description' => FALSE, 481 'description' => '', 482 )); 483 $handler->override_option('row_plugin', 'node_rss'); 484 $handler->override_option('path', 'project/issues/search/rss'); 485 $handler->override_option('menu', array( 486 'type' => 'none', 487 'title' => '', 488 'description' => '', 489 'weight' => 0, 490 'name' => '', 491 )); 492 $handler->override_option('tab_options', array( 493 'type' => 'none', 494 'title' => '', 495 'description' => '', 496 'weight' => 0, 497 )); 498 $handler->override_option('displays', array( 499 'page_1' => 'page_1', 500 'default' => 0, 501 )); 502 $handler->override_option('sitename_title', FALSE); 503
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 |