| 1 |
<?php
|
| 2 |
// $Id: casetracker.views_default.inc,v 1.2 2009/02/11 04:09:02 jmiccolis Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_views_default_views().
|
| 6 |
*/
|
| 7 |
function casetracker_views_default_views() {
|
| 8 |
$list = array(
|
| 9 |
'casetracker_project_options',
|
| 10 |
'casetracker_project_cases',
|
| 11 |
);
|
| 12 |
$views = array();
|
| 13 |
foreach ($list as $view_name) {
|
| 14 |
$view = call_user_func('_view_'. $view_name);
|
| 15 |
$views[$view->name] = $view;
|
| 16 |
}
|
| 17 |
return $views;
|
| 18 |
}
|
| 19 |
|
| 20 |
function _view_casetracker_project_options() {
|
| 21 |
$view = new view;
|
| 22 |
$view->name = 'casetracker_project_options';
|
| 23 |
$view->description = 'Casetracker > Project options query builder';
|
| 24 |
$view->tag = 'casetracker';
|
| 25 |
$view->view_php = '';
|
| 26 |
$view->base_table = 'node';
|
| 27 |
$view->is_cacheable = FALSE;
|
| 28 |
$view->api_version = 2;
|
| 29 |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
| 30 |
$handler = $view->new_display('default', 'Defaults', 'default');
|
| 31 |
$handler->override_option('fields', array(
|
| 32 |
'title' => array(
|
| 33 |
'label' => '',
|
| 34 |
'link_to_node' => 0,
|
| 35 |
'exclude' => 0,
|
| 36 |
'id' => 'title',
|
| 37 |
'table' => 'node',
|
| 38 |
'field' => 'title',
|
| 39 |
'relationship' => 'none',
|
| 40 |
),
|
| 41 |
));
|
| 42 |
$handler->override_option('sorts', array(
|
| 43 |
'title' => array(
|
| 44 |
'order' => 'ASC',
|
| 45 |
'id' => 'title',
|
| 46 |
'table' => 'node',
|
| 47 |
'field' => 'title',
|
| 48 |
'relationship' => 'none',
|
| 49 |
),
|
| 50 |
));
|
| 51 |
|
| 52 |
// Add project node types from stored variable
|
| 53 |
$projects = array();
|
| 54 |
foreach (variable_get('casetracker_project_node_types', array('casetracker_basic_project')) as $type) {
|
| 55 |
$projects[$type] = $type;
|
| 56 |
}
|
| 57 |
|
| 58 |
$filters = array(
|
| 59 |
'current' => array(
|
| 60 |
'operator' => 'active',
|
| 61 |
'value' => 'all',
|
| 62 |
'group' => '0',
|
| 63 |
'exposed' => FALSE,
|
| 64 |
'expose' => array(
|
| 65 |
'operator' => FALSE,
|
| 66 |
'label' => '',
|
| 67 |
),
|
| 68 |
'id' => 'current',
|
| 69 |
'table' => 'spaces',
|
| 70 |
'field' => 'current',
|
| 71 |
'relationship' => 'none',
|
| 72 |
),
|
| 73 |
'status' => array(
|
| 74 |
'operator' => '=',
|
| 75 |
'value' => 1,
|
| 76 |
'group' => '0',
|
| 77 |
'exposed' => FALSE,
|
| 78 |
'expose' => array(
|
| 79 |
'operator' => FALSE,
|
| 80 |
'label' => '',
|
| 81 |
),
|
| 82 |
'id' => 'status',
|
| 83 |
'table' => 'node',
|
| 84 |
'field' => 'status',
|
| 85 |
'relationship' => 'none',
|
| 86 |
),
|
| 87 |
'type' => array(
|
| 88 |
'operator' => 'in',
|
| 89 |
'value' => $projects,
|
| 90 |
'group' => '0',
|
| 91 |
'exposed' => FALSE,
|
| 92 |
'expose' => array(
|
| 93 |
'operator' => FALSE,
|
| 94 |
'label' => '',
|
| 95 |
),
|
| 96 |
'id' => 'type',
|
| 97 |
'table' => 'node',
|
| 98 |
'field' => 'type',
|
| 99 |
'relationship' => 'none',
|
| 100 |
),
|
| 101 |
);
|
| 102 |
if (!module_exists('spaces')) {
|
| 103 |
unset($filters['current']);
|
| 104 |
}
|
| 105 |
$handler->override_option('filters', $filters);
|
| 106 |
$handler->override_option('access', array(
|
| 107 |
'type' => 'none',
|
| 108 |
));
|
| 109 |
$handler->override_option('items_per_page', 0);
|
| 110 |
return $view;
|
| 111 |
}
|
| 112 |
|
| 113 |
function _view_casetracker_project_cases() {
|
| 114 |
$view = new view;
|
| 115 |
$view->name = 'casetracker_project_cases';
|
| 116 |
$view->description = 'Casetracker > Cases by project page';
|
| 117 |
$view->tag = 'casetracker';
|
| 118 |
$view->view_php = '';
|
| 119 |
$view->base_table = 'node';
|
| 120 |
$view->is_cacheable = FALSE;
|
| 121 |
$view->api_version = 2;
|
| 122 |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
| 123 |
$handler = $view->new_display('default', 'Defaults', 'default');
|
| 124 |
$handler->override_option('fields', array(
|
| 125 |
'title' => array(
|
| 126 |
'label' => 'Title',
|
| 127 |
'alter' => array(
|
| 128 |
'alter_text' => 0,
|
| 129 |
'text' => '',
|
| 130 |
'make_link' => 0,
|
| 131 |
'path' => '',
|
| 132 |
'alt' => '',
|
| 133 |
'prefix' => '',
|
| 134 |
'suffix' => '',
|
| 135 |
'help' => '',
|
| 136 |
'trim' => 0,
|
| 137 |
'max_length' => '',
|
| 138 |
'word_boundary' => 1,
|
| 139 |
'ellipsis' => 1,
|
| 140 |
'html' => 0,
|
| 141 |
),
|
| 142 |
'link_to_node' => 1,
|
| 143 |
'exclude' => 0,
|
| 144 |
'id' => 'title',
|
| 145 |
'table' => 'node',
|
| 146 |
'field' => 'title',
|
| 147 |
'override' => array(
|
| 148 |
'button' => 'Override',
|
| 149 |
),
|
| 150 |
'relationship' => 'none',
|
| 151 |
),
|
| 152 |
'last_updated' => array(
|
| 153 |
'label' => 'Last updated',
|
| 154 |
'alter' => array(
|
| 155 |
'alter_text' => 0,
|
| 156 |
'text' => '',
|
| 157 |
'make_link' => 0,
|
| 158 |
'path' => '',
|
| 159 |
'alt' => '',
|
| 160 |
'prefix' => '',
|
| 161 |
'suffix' => '',
|
| 162 |
'help' => '',
|
| 163 |
'trim' => 0,
|
| 164 |
'max_length' => '',
|
| 165 |
'word_boundary' => 1,
|
| 166 |
'ellipsis' => 1,
|
| 167 |
'html' => 0,
|
| 168 |
),
|
| 169 |
'date_format' => 'small',
|
| 170 |
'custom_date_format' => '',
|
| 171 |
'exclude' => 0,
|
| 172 |
'id' => 'last_updated',
|
| 173 |
'table' => 'node_comment_statistics',
|
| 174 |
'field' => 'last_updated',
|
| 175 |
'relationship' => 'none',
|
| 176 |
),
|
| 177 |
'case_priority_id' => array(
|
| 178 |
'label' => 'Priority',
|
| 179 |
'alter' => array(
|
| 180 |
'alter_text' => 0,
|
| 181 |
'text' => '',
|
| 182 |
'make_link' => 0,
|
| 183 |
'path' => '',
|
| 184 |
'alt' => '',
|
| 185 |
'prefix' => '',
|
| 186 |
'suffix' => '',
|
| 187 |
'help' => '',
|
| 188 |
'trim' => 0,
|
| 189 |
'max_length' => '',
|
| 190 |
'word_boundary' => 1,
|
| 191 |
'ellipsis' => 1,
|
| 192 |
'html' => 0,
|
| 193 |
),
|
| 194 |
'exclude' => 0,
|
| 195 |
'id' => 'case_priority_id',
|
| 196 |
'table' => 'casetracker_case',
|
| 197 |
'field' => 'case_priority_id',
|
| 198 |
'relationship' => 'none',
|
| 199 |
),
|
| 200 |
'case_status_id' => array(
|
| 201 |
'label' => 'Status',
|
| 202 |
'alter' => array(
|
| 203 |
'alter_text' => 0,
|
| 204 |
'text' => '',
|
| 205 |
'make_link' => 0,
|
| 206 |
'path' => '',
|
| 207 |
'alt' => '',
|
| 208 |
'prefix' => '',
|
| 209 |
'suffix' => '',
|
| 210 |
'help' => '',
|
| 211 |
'trim' => 0,
|
| 212 |
'max_length' => '',
|
| 213 |
'word_boundary' => 1,
|
| 214 |
'ellipsis' => 1,
|
| 215 |
'html' => 0,
|
| 216 |
),
|
| 217 |
'exclude' => 0,
|
| 218 |
'id' => 'case_status_id',
|
| 219 |
'table' => 'casetracker_case',
|
| 220 |
'field' => 'case_status_id',
|
| 221 |
'relationship' => 'none',
|
| 222 |
),
|
| 223 |
'case_type_id' => array(
|
| 224 |
'label' => 'Type',
|
| 225 |
'alter' => array(
|
| 226 |
'alter_text' => 0,
|
| 227 |
'text' => '',
|
| 228 |
'make_link' => 0,
|
| 229 |
'path' => '',
|
| 230 |
'alt' => '',
|
| 231 |
'prefix' => '',
|
| 232 |
'suffix' => '',
|
| 233 |
'help' => '',
|
| 234 |
'trim' => 0,
|
| 235 |
'max_length' => '',
|
| 236 |
'word_boundary' => 1,
|
| 237 |
'ellipsis' => 1,
|
| 238 |
'html' => 0,
|
| 239 |
),
|
| 240 |
'exclude' => 0,
|
| 241 |
'id' => 'case_type_id',
|
| 242 |
'table' => 'casetracker_case',
|
| 243 |
'field' => 'case_type_id',
|
| 244 |
'relationship' => 'none',
|
| 245 |
),
|
| 246 |
'assign_to' => array(
|
| 247 |
'label' => 'Assigned To',
|
| 248 |
'alter' => array(
|
| 249 |
'alter_text' => 0,
|
| 250 |
'text' => '',
|
| 251 |
'make_link' => 0,
|
| 252 |
'path' => '',
|
| 253 |
'alt' => '',
|
| 254 |
'prefix' => '',
|
| 255 |
'suffix' => '',
|
| 256 |
'help' => '',
|
| 257 |
'trim' => 0,
|
| 258 |
'max_length' => '',
|
| 259 |
'word_boundary' => 1,
|
| 260 |
'ellipsis' => 1,
|
| 261 |
'html' => 0,
|
| 262 |
),
|
| 263 |
'link_to_user' => 1,
|
| 264 |
'exclude' => 0,
|
| 265 |
'id' => 'assign_to',
|
| 266 |
'table' => 'casetracker_case',
|
| 267 |
'field' => 'assign_to',
|
| 268 |
'relationship' => 'none',
|
| 269 |
'override' => array(
|
| 270 |
'button' => 'Override',
|
| 271 |
),
|
| 272 |
),
|
| 273 |
));
|
| 274 |
$handler->override_option('sorts', array(
|
| 275 |
'last_updated' => array(
|
| 276 |
'order' => 'DESC',
|
| 277 |
'granularity' => 'second',
|
| 278 |
'id' => 'last_updated',
|
| 279 |
'table' => 'node_comment_statistics',
|
| 280 |
'field' => 'last_updated',
|
| 281 |
'override' => array(
|
| 282 |
'button' => 'Override',
|
| 283 |
),
|
| 284 |
'relationship' => 'none',
|
| 285 |
),
|
| 286 |
));
|
| 287 |
$handler->override_option('filters', array(
|
| 288 |
'status' => array(
|
| 289 |
'operator' => '=',
|
| 290 |
'value' => '1',
|
| 291 |
'group' => '0',
|
| 292 |
'exposed' => FALSE,
|
| 293 |
'expose' => array(
|
| 294 |
'operator' => FALSE,
|
| 295 |
'label' => '',
|
| 296 |
),
|
| 297 |
'id' => 'status',
|
| 298 |
'table' => 'node',
|
| 299 |
'field' => 'status',
|
| 300 |
'relationship' => 'none',
|
| 301 |
),
|
| 302 |
'case' => array(
|
| 303 |
'operator' => '=',
|
| 304 |
'value' => '',
|
| 305 |
'group' => '0',
|
| 306 |
'exposed' => FALSE,
|
| 307 |
'expose' => array(
|
| 308 |
'operator' => FALSE,
|
| 309 |
'label' => '',
|
| 310 |
),
|
| 311 |
'id' => 'case',
|
| 312 |
'table' => 'node',
|
| 313 |
'field' => 'case',
|
| 314 |
'relationship' => 'none',
|
| 315 |
),
|
| 316 |
'pid' => array(
|
| 317 |
'operator' => 'or',
|
| 318 |
'value' => array(),
|
| 319 |
'group' => '0',
|
| 320 |
'exposed' => TRUE,
|
| 321 |
'expose' => array(
|
| 322 |
'use_operator' => 0,
|
| 323 |
'operator' => 'pid_op',
|
| 324 |
'identifier' => 'pid',
|
| 325 |
'label' => 'Project',
|
| 326 |
'optional' => 1,
|
| 327 |
'single' => 1,
|
| 328 |
'remember' => 0,
|
| 329 |
'reduce' => 0,
|
| 330 |
),
|
| 331 |
'id' => 'pid',
|
| 332 |
'table' => 'casetracker_case',
|
| 333 |
'field' => 'pid',
|
| 334 |
'relationship' => 'none',
|
| 335 |
'reduce_duplicates' => 0,
|
| 336 |
),
|
| 337 |
'case_priority_id' => array(
|
| 338 |
'operator' => 'or',
|
| 339 |
'value' => array(),
|
| 340 |
'group' => '0',
|
| 341 |
'exposed' => TRUE,
|
| 342 |
'expose' => array(
|
| 343 |
'use_operator' => 0,
|
| 344 |
'operator' => 'case_priority_id_op',
|
| 345 |
'identifier' => 'case_priority_id',
|
| 346 |
'label' => 'Priority',
|
| 347 |
'optional' => 1,
|
| 348 |
'single' => 0,
|
| 349 |
'remember' => 0,
|
| 350 |
'reduce' => 0,
|
| 351 |
),
|
| 352 |
'id' => 'case_priority_id',
|
| 353 |
'table' => 'casetracker_case',
|
| 354 |
'field' => 'case_priority_id',
|
| 355 |
'override' => array(
|
| 356 |
'button' => 'Override',
|
| 357 |
),
|
| 358 |
'relationship' => 'none',
|
| 359 |
'reduce_duplicates' => 0,
|
| 360 |
),
|
| 361 |
'case_status_id' => array(
|
| 362 |
'operator' => 'or',
|
| 363 |
'value' => array(),
|
| 364 |
'group' => '0',
|
| 365 |
'exposed' => TRUE,
|
| 366 |
'expose' => array(
|
| 367 |
'use_operator' => 0,
|
| 368 |
'operator' => 'case_status_id_op',
|
| 369 |
'identifier' => 'case_status_id',
|
| 370 |
'label' => 'Status',
|
| 371 |
'optional' => 1,
|
| 372 |
'single' => 0,
|
| 373 |
'remember' => 0,
|
| 374 |
'reduce' => 0,
|
| 375 |
),
|
| 376 |
'id' => 'case_status_id',
|
| 377 |
'table' => 'casetracker_case',
|
| 378 |
'field' => 'case_status_id',
|
| 379 |
'override' => array(
|
| 380 |
'button' => 'Override',
|
| 381 |
),
|
| 382 |
'relationship' => 'none',
|
| 383 |
'reduce_duplicates' => 0,
|
| 384 |
),
|
| 385 |
'case_type_id' => array(
|
| 386 |
'operator' => 'or',
|
| 387 |
'value' => array(),
|
| 388 |
'group' => '0',
|
| 389 |
'exposed' => TRUE,
|
| 390 |
'expose' => array(
|
| 391 |
'use_operator' => 0,
|
| 392 |
'operator' => 'case_type_id_op',
|
| 393 |
'identifier' => 'case_type_id',
|
| 394 |
'label' => 'Type',
|
| 395 |
'optional' => 1,
|
| 396 |
'single' => 0,
|
| 397 |
'remember' => 0,
|
| 398 |
'reduce' => 0,
|
| 399 |
),
|
| 400 |
'id' => 'case_type_id',
|
| 401 |
'table' => 'casetracker_case',
|
| 402 |
'field' => 'case_type_id',
|
| 403 |
'override' => array(
|
| 404 |
'button' => 'Override',
|
| 405 |
),
|
| 406 |
'relationship' => 'none',
|
| 407 |
'reduce_duplicates' => 0,
|
| 408 |
),
|
| 409 |
));
|
| 410 |
$handler->override_option('access', array(
|
| 411 |
'type' => 'none',
|
| 412 |
));
|
| 413 |
$handler->override_option('title', 'Cases');
|
| 414 |
$handler->override_option('use_ajax', TRUE);
|
| 415 |
$handler->override_option('items_per_page', 20);
|
| 416 |
$handler->override_option('use_pager', '1');
|
| 417 |
$handler->override_option('style_plugin', 'table');
|
| 418 |
$handler->override_option('style_options', array(
|
| 419 |
'grouping' => '',
|
| 420 |
'override' => 1,
|
| 421 |
'sticky' => 0,
|
| 422 |
'order' => 'asc',
|
| 423 |
'columns' => array(
|
| 424 |
'case_number' => 'case_number',
|
| 425 |
'title' => 'title',
|
| 426 |
'last_updated' => 'last_updated',
|
| 427 |
'case_priority_id' => 'case_priority_id',
|
| 428 |
'case_status_id' => 'case_status_id',
|
| 429 |
'case_type_id' => 'case_type_id',
|
| 430 |
'assign_to' => 'assign_to',
|
| 431 |
),
|
| 432 |
'info' => array(
|
| 433 |
'case_number' => array(
|
| 434 |
'sortable' => 1,
|
| 435 |
'separator' => '',
|
| 436 |
),
|
| 437 |
'title' => array(
|
| 438 |
'sortable' => 1,
|
| 439 |
'separator' => '',
|
| 440 |
),
|
| 441 |
'last_updated' => array(
|
| 442 |
'sortable' => 1,
|
| 443 |
'separator' => '',
|
| 444 |
),
|
| 445 |
'case_priority_id' => array(
|
| 446 |
'sortable' => 1,
|
| 447 |
'separator' => '',
|
| 448 |
),
|
| 449 |
'case_status_id' => array(
|
| 450 |
'sortable' => 1,
|
| 451 |
'separator' => '',
|
| 452 |
),
|
| 453 |
'case_type_id' => array(
|
| 454 |
'sortable' => 1,
|
| 455 |
'separator' => '',
|
| 456 |
),
|
| 457 |
'assign_to' => array(
|
| 458 |
'sortable' => 1,
|
| 459 |
'separator' => '',
|
| 460 |
),
|
| 461 |
),
|
| 462 |
'default' => '-1',
|
| 463 |
));
|
| 464 |
$handler = $view->new_display('page', 'Cases', 'page_1');
|
| 465 |
$handler->override_option('path', 'casetracker');
|
| 466 |
$handler->override_option('menu', array(
|
| 467 |
'type' => 'normal',
|
| 468 |
'title' => 'Casetracker',
|
| 469 |
'description' => '',
|
| 470 |
'weight' => '0',
|
| 471 |
'name' => 'navigation',
|
| 472 |
));
|
| 473 |
$handler->override_option('tab_options', array(
|
| 474 |
'type' => 'none',
|
| 475 |
'title' => '',
|
| 476 |
'description' => '',
|
| 477 |
'weight' => 0,
|
| 478 |
));
|
| 479 |
$handler = $view->new_display('page', 'My cases', 'page_2');
|
| 480 |
$handler->override_option('fields', array(
|
| 481 |
'title' => array(
|
| 482 |
'label' => 'Title',
|
| 483 |
'alter' => array(
|
| 484 |
'alter_text' => 0,
|
| 485 |
'text' => '',
|
| 486 |
'make_link' => 0,
|
| 487 |
'path' => '',
|
| 488 |
'alt' => '',
|
| 489 |
'prefix' => '',
|
| 490 |
'suffix' => '',
|
| 491 |
'help' => '',
|
| 492 |
'trim' => 0,
|
| 493 |
'max_length' => '',
|
| 494 |
'word_boundary' => 1,
|
| 495 |
'ellipsis' => 1,
|
| 496 |
'html' => 0,
|
| 497 |
),
|
| 498 |
'link_to_node' => 1,
|
| 499 |
'exclude' => 0,
|
| 500 |
'id' => 'title',
|
| 501 |
'table' => 'node',
|
| 502 |
'field' => 'title',
|
| 503 |
'override' => array(
|
| 504 |
'button' => 'Override',
|
| 505 |
),
|
| 506 |
'relationship' => 'none',
|
| 507 |
),
|
| 508 |
'last_updated' => array(
|
| 509 |
'label' => 'Last updated',
|
| 510 |
'alter' => array(
|
| 511 |
'alter_text' => 0,
|
| 512 |
'text' => '',
|
| 513 |
'make_link' => 0,
|
| 514 |
'path' => '',
|
| 515 |
'alt' => '',
|
| 516 |
'prefix' => '',
|
| 517 |
'suffix' => '',
|
| 518 |
'help' => '',
|
| 519 |
'trim' => 0,
|
| 520 |
'max_length' => '',
|
| 521 |
'word_boundary' => 1,
|
| 522 |
'ellipsis' => 1,
|
| 523 |
'html' => 0,
|
| 524 |
),
|
| 525 |
'date_format' => 'small',
|
| 526 |
'custom_date_format' => '',
|
| 527 |
'exclude' => 0,
|
| 528 |
'id' => 'last_updated',
|
| 529 |
'table' => 'node_comment_statistics',
|
| 530 |
'field' => 'last_updated',
|
| 531 |
'relationship' => 'none',
|
| 532 |
),
|
| 533 |
'case_priority_id' => array(
|
| 534 |
'label' => 'Priority',
|
| 535 |
'alter' => array(
|
| 536 |
'alter_text' => 0,
|
| 537 |
'text' => '',
|
| 538 |
'make_link' => 0,
|
| 539 |
'path' => '',
|
| 540 |
'alt' => '',
|
| 541 |
'prefix' => '',
|
| 542 |
'suffix' => '',
|
| 543 |
'help' => '',
|
| 544 |
'trim' => 0,
|
| 545 |
'max_length' => '',
|
| 546 |
'word_boundary' => 1,
|
| 547 |
'ellipsis' => 1,
|
| 548 |
'html' => 0,
|
| 549 |
),
|
| 550 |
'exclude' => 0,
|
| 551 |
'id' => 'case_priority_id',
|
| 552 |
'table' => 'casetracker_case',
|
| 553 |
'field' => 'case_priority_id',
|
| 554 |
'relationship' => 'none',
|
| 555 |
),
|
| 556 |
'case_status_id' => array(
|
| 557 |
'label' => 'Status',
|
| 558 |
'alter' => array(
|
| 559 |
'alter_text' => 0,
|
| 560 |
'text' => '',
|
| 561 |
'make_link' => 0,
|
| 562 |
'path' => '',
|
| 563 |
'alt' => '',
|
| 564 |
'prefix' => '',
|
| 565 |
'suffix' => '',
|
| 566 |
'help' => '',
|
| 567 |
'trim' => 0,
|
| 568 |
'max_length' => '',
|
| 569 |
'word_boundary' => 1,
|
| 570 |
'ellipsis' => 1,
|
| 571 |
'html' => 0,
|
| 572 |
),
|
| 573 |
'exclude' => 0,
|
| 574 |
'id' => 'case_status_id',
|
| 575 |
'table' => 'casetracker_case',
|
| 576 |
'field' => 'case_status_id',
|
| 577 |
'relationship' => 'none',
|
| 578 |
),
|
| 579 |
'case_type_id' => array(
|
| 580 |
'label' => 'Type',
|
| 581 |
'alter' => array(
|
| 582 |
'alter_text' => 0,
|
| 583 |
'text' => '',
|
| 584 |
'make_link' => 0,
|
| 585 |
'path' => '',
|
| 586 |
'alt' => '',
|
| 587 |
'prefix' => '',
|
| 588 |
'suffix' => '',
|
| 589 |
'help' => '',
|
| 590 |
'trim' => 0,
|
| 591 |
'max_length' => '',
|
| 592 |
'word_boundary' => 1,
|
| 593 |
'ellipsis' => 1,
|
| 594 |
'html' => 0,
|
| 595 |
),
|
| 596 |
'exclude' => 0,
|
| 597 |
'id' => 'case_type_id',
|
| 598 |
'table' => 'casetracker_case',
|
| 599 |
'field' => 'case_type_id',
|
| 600 |
'relationship' => 'none',
|
| 601 |
),
|
| 602 |
));
|
| 603 |
$handler->override_option('filters', array(
|
| 604 |
'status' => array(
|
| 605 |
'operator' => '=',
|
| 606 |
'value' => '1',
|
| 607 |
'group' => '0',
|
| 608 |
'exposed' => FALSE,
|
| 609 |
'expose' => array(
|
| 610 |
'operator' => FALSE,
|
| 611 |
'label' => '',
|
| 612 |
),
|
| 613 |
'id' => 'status',
|
| 614 |
'table' => 'node',
|
| 615 |
'field' => 'status',
|
| 616 |
'relationship' => 'none',
|
| 617 |
),
|
| 618 |
'case' => array(
|
| 619 |
'id' => 'case',
|
| 620 |
'table' => 'node',
|
| 621 |
'field' => 'case',
|
| 622 |
),
|
| 623 |
'assign_to' => array(
|
| 624 |
'operator' => 'or',
|
| 625 |
'value' => array(
|
| 626 |
'***CURRENT_USER***' => '***CURRENT_USER***',
|
| 627 |
),
|
| 628 |
'group' => '0',
|
| 629 |
'exposed' => FALSE,
|
| 630 |
'expose' => array(
|
| 631 |
'operator' => FALSE,
|
| 632 |
'label' => '',
|
| 633 |
),
|
| 634 |
'id' => 'assign_to',
|
| 635 |
'table' => 'casetracker_case',
|
| 636 |
'field' => 'assign_to',
|
| 637 |
'override' => array(
|
| 638 |
'button' => 'Use default',
|
| 639 |
),
|
| 640 |
'relationship' => 'none',
|
| 641 |
'reduce_duplicates' => 0,
|
| 642 |
),
|
| 643 |
'pid' => array(
|
| 644 |
'operator' => 'or',
|
| 645 |
'value' => array(),
|
| 646 |
'group' => '0',
|
| 647 |
'exposed' => TRUE,
|
| 648 |
'expose' => array(
|
| 649 |
'use_operator' => 0,
|
| 650 |
'operator' => 'pid_op',
|
| 651 |
'identifier' => 'pid',
|
| 652 |
'label' => 'Project',
|
| 653 |
'optional' => 1,
|
| 654 |
'single' => 1,
|
| 655 |
'remember' => 0,
|
| 656 |
'reduce' => 0,
|
| 657 |
),
|
| 658 |
'id' => 'pid',
|
| 659 |
'table' => 'casetracker_case',
|
| 660 |
'field' => 'pid',
|
| 661 |
'relationship' => 'none',
|
| 662 |
'reduce_duplicates' => 0,
|
| 663 |
),
|
| 664 |
'case_type_id' => array(
|
| 665 |
'operator' => 'or',
|
| 666 |
'value' => array(),
|
| 667 |
'group' => '0',
|
| 668 |
'exposed' => TRUE,
|
| 669 |
'expose' => array(
|
| 670 |
'use_operator' => 0,
|
| 671 |
'operator' => 'case_type_id_op',
|
| 672 |
'identifier' => 'case_type_id',
|
| 673 |
'label' => 'Type',
|
| 674 |
'optional' => 1,
|
| 675 |
'single' => 0,
|
| 676 |
'remember' => 0,
|
| 677 |
'reduce' => 0,
|
| 678 |
),
|
| 679 |
'id' => 'case_type_id',
|
| 680 |
'table' => 'casetracker_case',
|
| 681 |
'field' => 'case_type_id',
|
| 682 |
'override' => array(
|
| 683 |
'button' => 'Override',
|
| 684 |
),
|
| 685 |
'relationship' => 'none',
|
| 686 |
'reduce_duplicates' => 0,
|
| 687 |
),
|
| 688 |
'case_priority_id' => array(
|
| 689 |
'operator' => 'or',
|
| 690 |
'value' => array(),
|
| 691 |
'group' => '0',
|
| 692 |
'exposed' => TRUE,
|
| 693 |
'expose' => array(
|
| 694 |
'use_operator' => 0,
|
| 695 |
'operator' => 'case_priority_id_op',
|
| 696 |
'identifier' => 'case_priority_id',
|
| 697 |
'label' => 'Priority',
|
| 698 |
'optional' => 1,
|
| 699 |
'single' => 0,
|
| 700 |
'remember' => 0,
|
| 701 |
'reduce' => 0,
|
| 702 |
),
|
| 703 |
'id' => 'case_priority_id',
|
| 704 |
'table' => 'casetracker_case',
|
| 705 |
'field' => 'case_priority_id',
|
| 706 |
'override' => array(
|
| 707 |
'button' => 'Override',
|
| 708 |
),
|
| 709 |
'relationship' => 'none',
|
| 710 |
'reduce_duplicates' => 0,
|
| 711 |
),
|
| 712 |
'case_status_id' => array(
|
| 713 |
'operator' => 'or',
|
| 714 |
'value' => array(),
|
| 715 |
'group' => '0',
|
| 716 |
'exposed' => TRUE,
|
| 717 |
'expose' => array(
|
| 718 |
'use_operator' => 0,
|
| 719 |
'operator' => 'case_status_id_op',
|
| 720 |
'identifier' => 'case_status_id',
|
| 721 |
'label' => 'Status',
|
| 722 |
'optional' => 1,
|
| 723 |
'single' => 0,
|
| 724 |
'remember' => 0,
|
| 725 |
'reduce' => 0,
|
| 726 |
),
|
| 727 |
'id' => 'case_status_id',
|
| 728 |
'table' => 'casetracker_case',
|
| 729 |
'field' => 'case_status_id',
|
| 730 |
'override' => array(
|
| 731 |
'button' => 'Override',
|
| 732 |
),
|
| 733 |
'relationship' => 'none',
|
| 734 |
'reduce_duplicates' => 0,
|
| 735 |
),
|
| 736 |
));
|
| 737 |
$handler->override_option('title', 'My cases');
|
| 738 |
$handler->override_option('path', 'casetracker/my');
|
| 739 |
$handler->override_option('menu', array(
|
| 740 |
'type' => 'tab',
|
| 741 |
'title' => 'My cases',
|
| 742 |
'description' => '',
|
| 743 |
'weight' => '0',
|
| 744 |
'name' => 'navigation',
|
| 745 |
));
|
| 746 |
$handler->override_option('tab_options', array(
|
| 747 |
'type' => 'none',
|
| 748 |
'title' => '',
|
| 749 |
'description' => '',
|
| 750 |
'weight' => 0,
|
| 751 |
));
|
| 752 |
$handler = $view->new_display('page', 'Projects', 'page_3');
|
| 753 |
$handler->override_option('fields', array(
|
| 754 |
'title' => array(
|
| 755 |
'label' => 'Title',
|
| 756 |
'alter' => array(
|
| 757 |
'alter_text' => 0,
|
| 758 |
'text' => '',
|
| 759 |
'make_link' => 0,
|
| 760 |
'path' => '',
|
| 761 |
'alt' => '',
|
| 762 |
'prefix' => '',
|
| 763 |
'suffix' => '',
|
| 764 |
'help' => '',
|
| 765 |
'trim' => 0,
|
| 766 |
'max_length' => '',
|
| 767 |
'word_boundary' => 1,
|
| 768 |
'ellipsis' => 1,
|
| 769 |
'html' => 0,
|
| 770 |
),
|
| 771 |
'link_to_node' => 1,
|
| 772 |
'exclude' => 0,
|
| 773 |
'id' => 'title',
|
| 774 |
'table' => 'node',
|
| 775 |
'field' => 'title',
|
| 776 |
'override' => array(
|
| 777 |
'button' => 'Override',
|
| 778 |
),
|
| 779 |
'relationship' => 'none',
|
| 780 |
),
|
| 781 |
'last_updated' => array(
|
| 782 |
'label' => 'Last updated',
|
| 783 |
'alter' => array(
|
| 784 |
'alter_text' => 0,
|
| 785 |
'text' => '',
|
| 786 |
'make_link' => 0,
|
| 787 |
'path' => '',
|
| 788 |
'alt' => '',
|
| 789 |
'prefix' => '',
|
| 790 |
'suffix' => '',
|
| 791 |
'help' => '',
|
| 792 |
'trim' => 0,
|
| 793 |
'max_length' => '',
|
| 794 |
'word_boundary' => 1,
|
| 795 |
'ellipsis' => 1,
|
| 796 |
'html' => 0,
|
| 797 |
),
|
| 798 |
'date_format' => 'small',
|
| 799 |
'custom_date_format' => '',
|
| 800 |
'exclude' => 0,
|
| 801 |
'id' => 'last_updated',
|
| 802 |
'table' => 'node_comment_statistics',
|
| 803 |
'field' => 'last_updated',
|
| 804 |
'relationship' => 'none',
|
| 805 |
),
|
| 806 |
));
|
| 807 |
$handler->override_option('filters', array(
|
| 808 |
'status' => array(
|
| 809 |
'operator' => '=',
|
| 810 |
'value' => '1',
|
| 811 |
'group' => '0',
|
| 812 |
'exposed' => FALSE,
|
| 813 |
'expose' => array(
|
| 814 |
'operator' => FALSE,
|
| 815 |
'label' => '',
|
| 816 |
),
|
| 817 |
'id' => 'status',
|
| 818 |
'table' => 'node',
|
| 819 |
'field' => 'status',
|
| 820 |
'relationship' => 'none',
|
| 821 |
),
|
| 822 |
'project' => array(
|
| 823 |
'operator' => '=',
|
| 824 |
'value' => '',
|
| 825 |
'group' => '0',
|
| 826 |
'exposed' => FALSE,
|
| 827 |
'expose' => array(
|
| 828 |
'operator' => FALSE,
|
| 829 |
'label' => '',
|
| 830 |
),
|
| 831 |
'id' => 'project',
|
| 832 |
'table' => 'node',
|
| 833 |
'field' => 'project',
|
| 834 |
'override' => array(
|
| 835 |
'button' => 'Use default',
|
| 836 |
),
|
| 837 |
'relationship' => 'none',
|
| 838 |
),
|
| 839 |
));
|
| 840 |
$handler->override_option('title', 'Projects');
|
| 841 |
$handler->override_option('path', 'casetracker/projects');
|
| 842 |
$handler->override_option('menu', array(
|
| 843 |
'type' => 'tab',
|
| 844 |
'title' => 'Projects',
|
| 845 |
'description' => '',
|
| 846 |
'weight' => '0',
|
| 847 |
'name' => 'navigation',
|
| 848 |
));
|
| 849 |
$handler->override_option('tab_options', array(
|
| 850 |
'type' => 'none',
|
| 851 |
'title' => '',
|
| 852 |
'description' => '',
|
| 853 |
'weight' => 0,
|
| 854 |
));
|
| 855 |
$handler = $view->new_display('page', 'Default tab', 'page_4');
|
| 856 |
$handler->override_option('path', 'casetracker/cases');
|
| 857 |
$handler->override_option('menu', array(
|
| 858 |
'type' => 'default tab',
|
| 859 |
'title' => 'Cases',
|
| 860 |
'description' => '',
|
| 861 |
'weight' => '0',
|
| 862 |
'name' => 'navigation',
|
| 863 |
));
|
| 864 |
$handler->override_option('tab_options', array(
|
| 865 |
'type' => 'none',
|
| 866 |
'title' => 'Casetracker',
|
| 867 |
'description' => '',
|
| 868 |
'weight' => '0',
|
| 869 |
));
|
| 870 |
return $view;
|
| 871 |
}
|
| 872 |
|