You are here

function _spaces_casetracker_views_cases_byuser in Spaces 5.2

Same name and namespace in other branches
  1. 5 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 = _spaces_casetracker_views_base();
  $view->name = 'spaces_cases_byuser';
  $view->description = t('Filter cases by user.');
  $view->menu = TRUE;
  $view->menu_title = t('Cases by user');
  $view->page = TRUE;
  $view->page_title = t('Cases by user');
  $view->url = 'cases/by-user';
  $view->sort = array(
    array(
      'tablename' => 'casetracker_case',
      'field' => 'case_status_id',
      'sortorder' => 'ASC',
      'options' => 'normal',
    ),
  );
  $view->filter['assign'] = array(
    'tablename' => 'casetracker_case',
    'field' => 'assign_to',
    'operator' => 'OR',
    'options' => '',
    'value' => array(
      0 => '29',
    ),
  );
  $view->exposed_filter = array(
    array(
      'tablename' => 'casetracker_case',
      'field' => 'assign_to',
      'label' => 'User',
      'optional' => '0',
      'is_default' => '0',
      'operator' => '1',
      'single' => '1',
    ),
  );
  return $view;
}