function _spaces_casetracker_views_cases_byproject in Spaces 5
Same name and namespace in other branches
- 5.2 spaces_casetracker/spaces_casetracker.module \_spaces_casetracker_views_cases_byproject()
1 string reference to '_spaces_casetracker_views_cases_byproject'
- spaces_casetracker_views_default_views in spaces_casetracker/
spaces_casetracker.module - Implementation of hook_default_views
File
- spaces_casetracker/
spaces_casetracker.module, line 985
Code
function _spaces_casetracker_views_cases_byproject() {
$view = new stdClass();
$view->name = 'spaces_cases_byproject';
$view->description = t('Filter cases by project.');
$view->access = array();
$view->view_args_php = '';
$view->menu = TRUE;
$view->menu_title = t('Cases by project');
$view->page = TRUE;
$view->page_title = 'Cases by project';
$view->page_empty = '<?php print _spaces_views_empty("casetracker"); ?>';
$view->page_empty_format = '2';
$view->page_type = 'table';
$view->url = 'cases/by-project';
$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',
),
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',
'sortable' => '1',
),
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_project',
'field' => 'project_number',
'operator' => 'OR',
'options' => '',
'value' => array(
0 => '100',
),
),
array(
'tablename' => 'og_ancestry',
'field' => 'picg',
'operator' => '=',
'options' => '',
'value' => '***CURRENT_GID***',
),
);
$view->exposed_filter = array(
array(
'tablename' => 'casetracker_project',
'field' => 'project_number',
'label' => 'Project',
'optional' => '0',
'is_default' => '1',
'operator' => '1',
'single' => '1',
),
);
$view->requires = array(
node,
casetracker_case,
casetracker_project,
);
return $view;
}