[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

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

   1  <?php
   2  // $Id: project_issue_user_projects.view.php,v 1.1 2009/06/18 03:38:43 dww Exp $
   3  
   4  /**
   5   * @file
   6   * Issues across all projects owned by a user.
   7   */
   8  
   9  $view = new view;
  10  $view->name = 'project_issue_user_projects';
  11  $view->description = "Project issues for a specific user's 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' => 'issues',
  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' => '',
 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  $handler->override_option('arguments', array(
 193    'uid' => array(
 194      'default_action' => 'default',
 195      'style_plugin' => 'default_summary',
 196      'style_options' => array(),
 197      'wildcard' => 'all',
 198      'wildcard_substitution' => 'All',
 199      'title' => 'Projects by %1',
 200      'default_argument_type' => 'current_user',
 201      'default_argument' => '',
 202      'validate_type' => 'user',
 203      'validate_fail' => 'not found',
 204      'break_phrase' => 0,
 205      'not' => 0,
 206      'id' => 'uid',
 207      'table' => 'users',
 208      'field' => 'uid',
 209      'relationship' => 'pid',
 210      'default_options_div_prefix' => '',
 211      'default_argument_user' => 0,
 212      'default_argument_fixed' => '',
 213      'default_argument_php' => '',
 214      'validate_user_argument_type' => 'either',
 215      'validate_user_restrict_roles' => 1,
 216      'validate_user_roles' => array('2' => 2),
 217    ),
 218  ));
 219  $filters = array(
 220    'status_extra' => array(
 221      'operator' => '=',
 222      'value' => '',
 223      'group' => '0',
 224      'exposed' => FALSE,
 225      'expose' => array(
 226        'operator' => FALSE,
 227        'label' => '',
 228      ),
 229      'id' => 'status_extra',
 230      'table' => 'node',
 231      'field' => 'status_extra',
 232      'relationship' => 'none',
 233    ),
 234    'pid' => array(
 235      'operator' => 'in',
 236      'value' => '',
 237      'group' => '0',
 238      'exposed' => TRUE,
 239      'expose' => array(
 240        'operator' => 'pid_op',
 241        'label' => 'Project',
 242        'use_operator' => 0,
 243        'identifier' => 'projects',
 244        'optional' => 1,
 245        'single' => 0,
 246        'remember' => 0,
 247        'reduce' => 0,
 248      ),
 249      'widget' => 'select',
 250      'project_source' => 'owner',
 251      'project_uid_argument' => 'uid',
 252      'id' => 'pid',
 253      'table' => 'project_issues',
 254      'field' => 'pid',
 255      'relationship' => 'none',
 256    ),
 257    'sid' => array(
 258      'operator' => 'in',
 259      'value' => array(
 260        'Open' => 'Open',
 261      ),
 262      'group' => '0',
 263      'exposed' => TRUE,
 264      'expose' => array(
 265        'use_operator' => 0,
 266        'operator' => 'sid_op',
 267        'identifier' => 'status',
 268        'label' => 'Status',
 269        'optional' => 1,
 270        'single' => 0,
 271        'remember' => 0,
 272        'reduce' => 0,
 273      ),
 274      'id' => 'sid',
 275      'table' => 'project_issues',
 276      'field' => 'sid',
 277      'relationship' => 'none',
 278    ),
 279    'priority' => array(
 280      'operator' => 'in',
 281      'value' => array(),
 282      'group' => '0',
 283      'exposed' => TRUE,
 284      'expose' => array(
 285        'use_operator' => 0,
 286        'operator' => 'priority_op',
 287        'identifier' => 'priorities',
 288        'label' => 'Priority',
 289        'optional' => 1,
 290        'single' => 0,
 291        'remember' => 0,
 292        'reduce' => 0,
 293      ),
 294      'id' => 'priority',
 295      'table' => 'project_issues',
 296      'field' => 'priority',
 297      'relationship' => 'none',
 298    ),
 299    'category' => array(
 300      'operator' => 'in',
 301      'value' => array(),
 302      'group' => '0',
 303      'exposed' => TRUE,
 304      'expose' => array(
 305        'use_operator' => 0,
 306        'operator' => 'category_op',
 307        'identifier' => 'categories',
 308        'label' => 'Category',
 309        'optional' => 1,
 310        'single' => 0,
 311        'remember' => 0,
 312        'reduce' => 0,
 313      ),
 314      'id' => 'category',
 315      'table' => 'project_issues',
 316      'field' => 'category',
 317      'relationship' => 'none',
 318    ),
 319  );
 320  if (module_exists('search')) {
 321    $search_filter['keys'] = array(
 322      'operator' => 'optional',
 323      'value' => '',
 324      'group' => '0',
 325      'exposed' => TRUE,
 326      'expose' => array(
 327        'use_operator' => 0,
 328        'operator' => 'keys_op',
 329        'identifier' => 'text',
 330        'label' => 'Search for',
 331        'optional' => 1,
 332        'remember' => 0,
 333      ),
 334      'id' => 'keys',
 335      'table' => 'search_index',
 336      'field' => 'keys',
 337      'relationship' => 'none',
 338    );
 339    $filters = $search_filter + $filters;
 340  }
 341  $handler->override_option('filters', $filters);
 342  $handler->override_option('access', array(
 343    'type' => 'project_issue_access_per_user_queue',
 344    'project_issue_user_argument' => 'uid',
 345  ));
 346  $handler->override_option('empty', 'No issues match your criteria.');
 347  $handler->override_option('empty_format', '1');
 348  $handler->override_option('items_per_page', 50);
 349  $handler->override_option('use_pager', '1');
 350  $handler->override_option('style_plugin', 'project_issue_table');
 351  $handler->override_option('style_options', array(
 352    'grouping' => '',
 353    'override' => 1,
 354    'sticky' => 1,
 355    'order' => 'desc',
 356    'columns' => array(
 357      'project_issue_queue' => 'project_issue_queue',
 358      'title' => 'title',
 359      'timestamp' => 'title',
 360      'sid' => 'sid',
 361      'priority' => 'priority',
 362      'category' => 'category',
 363      'version' => 'version',
 364      'comment_count' => 'comment_count',
 365      'new_comments' => 'comment_count',
 366      'last_comment_timestamp' => 'last_comment_timestamp',
 367      'name' => 'name',
 368      'score' => 'score',
 369    ),
 370    'info' => array(
 371      'project_issue_queue' => array(
 372        'sortable' => 1,
 373        'separator' => '',
 374      ),
 375      'title' => array(
 376        'sortable' => 1,
 377        'separator' => '',
 378      ),
 379      'timestamp' => array(
 380        'separator' => '',
 381      ),
 382      'sid' => array(
 383        'sortable' => 1,
 384        'separator' => '',
 385      ),
 386      'priority' => array(
 387        'sortable' => 1,
 388        'separator' => '',
 389      ),
 390      'category' => array(
 391        'sortable' => 1,
 392        'separator' => '',
 393      ),
 394      'version' => array(
 395        'sortable' => 1,
 396        'separator' => '',
 397      ),
 398      'comment_count' => array(
 399        'sortable' => 1,
 400        'separator' => '<br />',
 401      ),
 402      'new_comments' => array(
 403        'separator' => '',
 404      ),
 405      'last_comment_timestamp' => array(
 406        'sortable' => 1,
 407        'separator' => '',
 408      ),
 409      'name' => array(
 410        'sortable' => 1,
 411        'separator' => '',
 412      ),
 413      'score' => array(
 414        'sortable' => 1,
 415        'separator' => '',
 416      ),
 417    ),
 418    'default' => module_exists('search') ? 'score' : 'last_comment_timestamp',
 419  ));
 420  $handler = $view->new_display('page', 'Page', 'page_1');
 421  $handler->override_option('path', 'project/user');
 422  $handler->override_option('menu', array(
 423    'type' => 'normal',
 424    'title' => 'My projects',
 425    'description' => '',
 426    'weight' => '0',
 427    'name' => 'navigation',
 428  ));
 429  $handler->override_option('tab_options', array(
 430    'type' => 'none',
 431    'title' => '',
 432    'description' => '',
 433    'weight' => 0,
 434  ));
 435  $handler = $view->new_display('feed', 'Feed', 'feed_1');
 436  $handler->override_option('style_plugin', 'rss');
 437  $handler->override_option('style_options', array(
 438    'mission_description' => FALSE,
 439    'description' => '',
 440  ));
 441  $handler->override_option('row_plugin', 'node_rss');
 442  $handler->override_option('row_options', array(
 443    'item_length' => 'default',
 444  ));
 445  $handler->override_option('path', 'project/user/%/feed');
 446  $handler->override_option('menu', array(
 447    'type' => 'none',
 448    'title' => '',
 449    'description' => '',
 450    'weight' => 0,
 451    'name' => 'navigation',
 452  ));
 453  $handler->override_option('tab_options', array(
 454    'type' => 'none',
 455    'title' => '',
 456    'description' => '',
 457    'weight' => 0,
 458  ));
 459  $handler->override_option('displays', array(
 460    'page_1' => 'page_1',
 461    'default' => 0,
 462  ));
 463  $handler->override_option('sitename_title', FALSE);
 464  


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