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