function _spaces_casetracker_views_cases_byuser in Spaces 5
Same name and namespace in other branches
- 5.2 spaces_casetracker/spaces_casetracker.module \_spaces_casetracker_views_cases_byuser()
1 string reference to '_spaces_casetracker_views_cases_byuser'
- spaces_casetracker_views_default_views in spaces_casetracker/
spaces_casetracker.module - Implementation of hook_default_views
File
- spaces_casetracker/
spaces_casetracker.module, line 681
Code
function _spaces_casetracker_views_cases_byuser() {
$view = new stdClass();
$view->name = 'spaces_cases_byuser';
$view->description = t('Filter cases by user.');
$view->access = array();
$view->view_args_php = '';
$view->menu = TRUE;
$view->menu_title = t('Cases by user');
$view->page = TRUE;
$view->page_title = t('Cases by user');
$view->page_empty = '<?php print _spaces_views_empty("casetracker"); ?>';
$view->page_empty_format = '2';
$view->page_type = 'table';
$view->url = 'cases/by-user';
$view->use_pager = TRUE;
$view->nodes_per_page = '25';
$view->argument = array();
$view->sort = array(
array(
'tablename' => 'casetracker_case',
'field' => 'case_status_id',
'sortorder' => 'ASC',
'options' => 'normal',
),
);
$view->field = array(
array(
'tablename' => 'casetracker_case',
'field' => 'pid',
'label' => 'Project',
'handler' => 'spaces_views_handler_crayon_name',
'options' => 'casetracker',
'sortable' => '1',
),
array(
'tablename' => 'node',
'field' => 'title',
'label' => 'Title',
'handler' => 'views_handler_field_nodelink',
'options' => 'link',
),
array(
'tablename' => 'casetracker_case',
'field' => 'case_status_id',
'label' => 'Status',
),
array(
'tablename' => 'casetracker_case',
'field' => 'assign_to',
'label' => 'Assigned',
),
array(
'tablename' => 'casetracker_case',
'field' => 'case_priority_id',
'label' => 'Priority',
'sortable' => '1',
),
array(
'tablename' => 'node',
'field' => 'changed',
'label' => 'Updated',
'handler' => 'views_handler_field_date_small',
'sortable' => '1',
'defaultsort' => 'DESC',
),
);
$view->filter = array(
array(
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
array(
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array(
0 => 'casetracker_basic_case',
),
),
array(
'tablename' => 'casetracker_case',
'field' => 'assign_to',
'operator' => 'OR',
'options' => '',
'value' => array(
0 => '29',
),
),
array(
'tablename' => 'og_ancestry',
'field' => 'picg',
'operator' => '=',
'options' => '',
'value' => '***CURRENT_GID***',
),
);
$view->exposed_filter = array(
array(
'tablename' => 'casetracker_case',
'field' => 'assign_to',
'label' => 'User',
'optional' => '0',
'is_default' => '0',
'operator' => '1',
'single' => '1',
),
);
$view->requires = array(
node,
casetracker_case,
);
return $view;
}