[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/project_issue/views/default_views/ -> project_issue_search_project.view.php (source)

   1  <?php
   2  // $Id: project_issue_search_project.view.php,v 1.1 2009/06/18 03:38:43 dww Exp $
   3  
   4  /**
   5   * @file
   6   * Advanced issue search for a specific project.
   7   */
   8  
   9  $view = new view;
  10  $view->name = 'project_issue_search_project';
  11  $view->description = 'Project issue advanced search for specific 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    'title' => array(
  46      'label' => 'Summary',
  47      'link_to_node' => 1,
  48      'exclude' => 0,
  49      'id' => 'title',
  50      'table' => 'node',
  51      'field' => 'title',
  52      'relationship' => 'none',
  53    ),
  54    'timestamp' => array(
  55      'label' => '',
  56      'alter' => array(),
  57      'link_to_node' => 0,
  58      'comments' => 0,
  59      'exclude' => 0,
  60      'id' => 'timestamp',
  61      'table' => 'history_user',
  62      'field' => 'timestamp',
  63      'relationship' => 'none',
  64    ),
  65    'sid' => array(
  66      'id' => 'sid',
  67      'table' => 'project_issues',
  68      'field' => 'sid',
  69    ),
  70    'priority' => array(
  71      'id' => 'priority',
  72      'table' => 'project_issues',
  73      'field' => 'priority',
  74    ),
  75    'category' => array(
  76      'label' => 'Category',
  77      'link_to_node' => 0,
  78      'exclude' => 0,
  79      'id' => 'category',
  80      'table' => 'project_issues',
  81      'field' => 'category',
  82      'relationship' => 'none',
  83    ),
  84    'version' => array(
  85      'label' => 'Version',
  86      'link_to_node' => 0,
  87      'exclude' => 0,
  88      'id' => 'version',
  89      'table' => 'project_release_nodes',
  90      'field' => 'version',
  91      'relationship' => 'rid',
  92    ),
  93    'component' => array(
  94      'label' => 'Component',
  95      'link_to_node' => 0,
  96      'exclude' => 0,
  97      'id' => 'component',
  98      'table' => 'project_issues',
  99      'field' => 'component',
 100      'relationship' => 'none',
 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  $handler->override_option('arguments', array(
 175    'pid' => array(
 176      'default_action' => 'not found',
 177      'style_plugin' => 'default_summary',
 178      'style_options' => array(),
 179      'wildcard' => '',
 180      'wildcard_substitution' => '',
 181      'title' => 'Search issues for %1',
 182      'default_argument_type' => 'fixed',
 183      'default_argument' => '',
 184      'validate_type' => 'project_nid',
 185      'validate_fail' => 'not found',
 186      'break_phrase' => 0,
 187      'not' => 0,
 188      'id' => 'pid',
 189      'table' => 'project_issues',
 190      'field' => 'pid',
 191      'relationship' => 'none',
 192      'default_options_div_prefix' => '',
 193      'default_argument_user' => 0,
 194      'default_argument_fixed' => '',
 195      'default_argument_php' => '',
 196      'validate_argument_node_type' => array(),
 197      'validate_argument_node_access' => 0,
 198      'validate_argument_nid_type' => 'nid',
 199      'validate_argument_vocabulary' => array(),
 200      'validate_argument_type' => 'tid',
 201      'validate_argument_project_term_vocabulary' => array(
 202        '1' => 0,
 203      ),
 204      'validate_argument_project_term_argument_type' => 'tid',
 205      'validate_argument_project_term_argument_action_top_without' => 'pass',
 206      'validate_argument_project_term_argument_action_top_with' => 'pass',
 207      'validate_argument_project_term_argument_action_child' => 'pass',
 208      'validate_argument_php' => '',
 209    ),
 210  ));
 211  $sorts['last_comment_timestamp'] = array(
 212    'order' => 'DESC',
 213    'granularity' => 'second',
 214    'id' => 'last_comment_timestamp',
 215    'table' => 'node_comment_statistics',
 216    'field' => 'last_comment_timestamp',
 217    'relationship' => 'none',
 218  );
 219  if (module_exists('search')) {
 220    $sorts['score'] = array(
 221      'order' => 'DESC',
 222      'id' => 'score',
 223      'table' => 'search_index',
 224      'field' => 'score',
 225      'relationship' => 'none',
 226    );
 227  }
 228  $handler->override_option('sorts', $sorts);
 229  $filters = array(
 230    'status_extra' => array(
 231      'operator' => '=',
 232      'value' => '',
 233      'group' => '0',
 234      'exposed' => FALSE,
 235      'expose' => array(
 236        'operator' => FALSE,
 237        'label' => '',
 238      ),
 239      'id' => 'status_extra',
 240      'table' => 'node',
 241      'field' => 'status_extra',
 242      'relationship' => 'none',
 243    ),
 244    'uid' => array(
 245      'operator' => 'in',
 246      'value' => '',
 247      'group' => '0',
 248      'exposed' => TRUE,
 249      'expose' => array(
 250        'use_operator' => 0,
 251        'operator' => 'uid_op',
 252        'identifier' => 'assigned',
 253        'label' => 'Assigned',
 254        'optional' => 1,
 255        'remember' => 0,
 256        'reduce' => 0,
 257      ),
 258      'id' => 'uid',
 259      'table' => 'users',
 260      'field' => 'uid',
 261      'relationship' => 'assigned',
 262    ),
 263    'uid_1' => array(
 264      'operator' => 'in',
 265      'value' => '',
 266      'group' => '0',
 267      'exposed' => TRUE,
 268      'expose' => array(
 269        'use_operator' => 0,
 270        'operator' => 'uid_1_op',
 271        'identifier' => 'submitted',
 272        'label' => 'Submitted by',
 273        'optional' => 1,
 274        'remember' => 0,
 275        'reduce' => 0,
 276      ),
 277      'id' => 'uid_1',
 278      'table' => 'users',
 279      'field' => 'uid',
 280      'relationship' => 'none',
 281    ),
 282    'uid_touch' => array(
 283      'operator' => 'in',
 284      'value' => '',
 285      'group' => '0',
 286      'exposed' => TRUE,
 287      'expose' => array(
 288        'use_operator' => 0,
 289        'operator' => 'uid_touch_op',
 290        'identifier' => 'participant',
 291        'label' => 'Participant',
 292        'optional' => 1,
 293        'remember' => 0,
 294        'reduce' => 0,
 295      ),
 296      'id' => 'uid_touch',
 297      'table' => 'node',
 298      'field' => 'uid_touch',
 299      'relationship' => 'none',
 300    ),
 301    'sid' => array(
 302      'operator' => 'in',
 303      'value' => array(),
 304      'group' => '0',
 305      'exposed' => TRUE,
 306      'expose' => array(
 307        'use_operator' => 0,
 308        'operator' => 'sid_op',
 309        'identifier' => 'status',
 310        'label' => 'Status',
 311        'optional' => 1,
 312        'single' => 0,
 313        'remember' => 0,
 314        'reduce' => 0,
 315      ),
 316      'id' => 'sid',
 317      'table' => 'project_issues',
 318      'field' => 'sid',
 319      'relationship' => 'none',
 320    ),
 321    'priority' => array(
 322      'operator' => 'in',
 323      'value' => array(),
 324      'group' => '0',
 325      'exposed' => TRUE,
 326      'expose' => array(
 327        'use_operator' => 0,
 328        'operator' => 'priority_op',
 329        'identifier' => 'priorities',
 330        'label' => 'Priority',
 331        'optional' => 1,
 332        'single' => 0,
 333        'remember' => 0,
 334        'reduce' => 0,
 335      ),
 336      'id' => 'priority',
 337      'table' => 'project_issues',
 338      'field' => 'priority',
 339      'relationship' => 'none',
 340    ),
 341    'category' => array(
 342      'operator' => 'in',
 343      'value' => array(),
 344      'group' => '0',
 345      'exposed' => TRUE,
 346      'expose' => array(
 347        'use_operator' => 0,
 348        'operator' => 'category_op',
 349        'identifier' => 'categories',
 350        'label' => 'Category',
 351        'optional' => 1,
 352        'single' => 0,
 353        'remember' => 0,
 354        'reduce' => 0,
 355      ),
 356      'id' => 'category',
 357      'table' => 'project_issues',
 358      'field' => 'category',
 359      'relationship' => 'none',
 360    ),
 361    'rid' => array(
 362      'operator' => 'in',
 363      'value' => array(),
 364      'group' => '0',
 365      'exposed' => TRUE,
 366      'expose' => array(
 367        'use_operator' => 0,
 368        'operator' => 'rid_op',
 369        'identifier' => 'version',
 370        'label' => 'Version',
 371        'optional' => 1,
 372        'single' => 0,
 373        'remember' => 0,
 374        'reduce' => 0,
 375      ),
 376      'id' => 'rid',
 377      'table' => 'project_issues',
 378      'field' => 'rid',
 379      'relationship' => 'none',
 380    ),
 381    'component' => array(
 382      'operator' => 'in',
 383      'value' => array(),
 384      'group' => '0',
 385      'exposed' => TRUE,
 386      'expose' => array(
 387        'use_operator' => 0,
 388        'operator' => 'component_op',
 389        'identifier' => 'component',
 390        'label' => 'Component',
 391        'optional' => 1,
 392        'single' => 0,
 393        'remember' => 0,
 394        'reduce' => 0,
 395      ),
 396      'id' => 'component',
 397      'table' => 'project_issues',
 398      'field' => 'component',
 399      'relationship' => 'none',
 400    ),
 401  );
 402  if (module_exists('search')) {
 403    $search_filter['keys'] = array(
 404      'operator' => 'optional',
 405      'value' => '',
 406      'group' => '0',
 407      'exposed' => TRUE,
 408      'expose' => array(
 409        'use_operator' => 0,
 410        'operator' => 'keys_op',
 411        'identifier' => 'text',
 412        'label' => 'Search for',
 413        'optional' => 1,
 414        'remember' => 0,
 415      ),
 416      'id' => 'keys',
 417      'table' => 'search_index',
 418      'field' => 'keys',
 419      'relationship' => 'none',
 420    );
 421    $filters = $search_filter + $filters;
 422  }
 423  _project_issue_views_add_taxonomy_filters($filters);
 424  $handler->override_option('filters', $filters);
 425  $handler->override_option('access', array(
 426    'type' => 'none',
 427  ));
 428  $handler->override_option('title', 'Search issues for a project');
 429  $handler->override_option('empty', 'No issues match your criteria.');
 430  $handler->override_option('empty_format', '1');
 431  $handler->override_option('items_per_page', 50);
 432  $handler->override_option('use_pager', '1');
 433  $handler->override_option('style_plugin', 'project_issue_table');
 434  $handler->override_option('style_options', array(
 435    'grouping' => '',
 436    'override' => 1,
 437    'sticky' => 1,
 438    'order' => 'desc',
 439    'columns' => array(
 440      'title' => 'title',
 441      'timestamp' => 'title',
 442      'sid' => 'sid',
 443      'priority' => 'priority',
 444      'category' => 'category',
 445      'version' => 'version',
 446      'component' => 'component',
 447      'comment_count' => 'comment_count',
 448      'new_comments' => 'comment_count',
 449      'last_comment_timestamp' => 'last_comment_timestamp',
 450      'name' => 'name',
 451      'score' => 'score',
 452    ),
 453    'info' => array(
 454      'title' => array(
 455        'sortable' => 1,
 456        'separator' => '',
 457      ),
 458      'timestamp' => array(
 459        'separator' => '',
 460      ),
 461      'sid' => array(
 462        'sortable' => 1,
 463        'separator' => '',
 464      ),
 465      'priority' => array(
 466        'sortable' => 1,
 467        'separator' => '',
 468      ),
 469      'category' => array(
 470        'sortable' => 1,
 471        'separator' => '',
 472      ),
 473      'version' => array(
 474        'sortable' => 1,
 475        'separator' => '',
 476      ),
 477      'component' => array(
 478        'sortable' => 1,
 479        'separator' => '',
 480      ),
 481      'comment_count' => array(
 482        'sortable' => 1,
 483        'separator' => '<br />',
 484      ),
 485      'new_comments' => array(
 486        'separator' => '',
 487      ),
 488      'last_comment_timestamp' => array(
 489        'sortable' => 1,
 490        'separator' => '',
 491      ),
 492      'name' => array(
 493        'sortable' => 1,
 494        'separator' => '',
 495      ),
 496      'score' => array(
 497        'sortable' => 1,
 498        'separator' => '',
 499      ),
 500    ),
 501    'default' => module_exists('search') ? 'score' : 'last_comment_timestamp',
 502  ));
 503  $handler = $view->new_display('page', 'Page', 'page_1');
 504  $handler->override_option('path', 'project/issues/search/%');
 505  $handler->override_option('menu', array(
 506    'type' => 'none',
 507    'title' => 'Advanced search',
 508    'description' => '',
 509    'weight' => '0',
 510    'name' => 'navigation',
 511  ));
 512  $handler->override_option('tab_options', array(
 513    'type' => 'none',
 514    'title' => '',
 515    'description' => '',
 516    'weight' => 0,
 517  ));
 518  $handler = $view->new_display('feed', 'Feed', 'feed_1');
 519  $handler->override_option('sorts', array(
 520    'last_comment_timestamp' => array(
 521      'order' => 'DESC',
 522      'granularity' => 'second',
 523      'id' => 'last_comment_timestamp',
 524      'table' => 'node_comment_statistics',
 525      'field' => 'last_comment_timestamp',
 526      'override' => array(
 527        'button' => 'Use default',
 528      ),
 529      'relationship' => 'none',
 530    ),
 531  ));
 532  $handler->override_option('style_plugin', 'rss');
 533  $handler->override_option('style_options', array(
 534    'mission_description' => FALSE,
 535    'description' => '',
 536  ));
 537  $handler->override_option('row_plugin', 'node_rss');
 538  $handler->override_option('path', 'project/issues/search/%/rss');
 539  $handler->override_option('menu', array(
 540    'type' => 'none',
 541    'title' => '',
 542    'description' => '',
 543    'weight' => 0,
 544    'name' => '',
 545  ));
 546  $handler->override_option('tab_options', array(
 547    'type' => 'none',
 548    'title' => '',
 549    'description' => '',
 550    'weight' => 0,
 551  ));
 552  $handler->override_option('displays', array(
 553    'page_1' => 'page_1',
 554    'default' => 0,
 555  ));
 556  $handler->override_option('sitename_title', FALSE);
 557  


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7